问题
How can i create Header project in react and want to share the same to other projects without npm?
Is there any way I can share script and selector like <Header></Header>
and they can use the same?
I have tried so many things but cann't able to share with other projects.
回答1:
Maybe you are talking about reusing Header component in some other project. I suggest you to take a look at Storybook . You can simply add that same component inside the new application and then use it there.
来源:https://stackoverflow.com/questions/62187769/create-header-header-widget-using-react-js-in-other-react-project