Create <Header></Header> widget using react js in other react project

天涯浪子 提交于 2020-06-29 04:13:09

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!