Best practice for creating reusable components?


#1

Hello,
I have several ‘components’ which i would like to reuse in other projects. I have a private NPM server which I would like to host them on and be able to NPM install them from there. What is the best practice?

A ‘component’ in my terms, is effectively the output of ionic generate page xyz although I have fleshed out several interface elements that, as I say, i wish to reuse. Some of these will depend on reusable (configurable) providers too.

Can anyone point me to any advice on how to set up something along these lines? In react for example I would simply create the component in JS, package it up, and npm publish. Then to consume, I would npm install, import and pass props to the imported component. I am seeking an equivalent workflow in Ionic.

Thanks