Answer the question
In order to leave comments, you need to log in
How to store your React components?
I often reuse react components, they are completely independent from the rest of the project, but each has its own dependencies in import .
So far I have found 2 solutions:
1. Git - you can create private repositories and install them with npm from there
2. https://bit .dev/ is essentially the same thing, only with its own cli
But here the question arises: how to get by with minimal gestures? The fact is that components are either a header block or a comment block and they are periodically improved, new props are added, new functionality + they need to be tested somehow in an existing project and only then updated in the repository. Or make some kind of demo component.
In general, the essence of the question is: how to store your custom components, so as not to bother too much and not run them as a separate project (because most often a component is a folder with an index.js file and images. inside everything is jsx + styled-component)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question