How to isolate and iterate over individual React components in a React application

谁说我不能喝 提交于 2020-01-25 01:44:32

问题


React hot loading is very nice.

There are some React components that are mounted after some user interaction. I want to implement these components separated from the application.

I don't want to separate them as different npm modules though. I just want to mount them to the landing page and implement.

This is like having a test runner that runs each component separately not for testing, but for implementing it live (changing css etc.).

Is this possible somehow?


回答1:


You're describing something like a decomposed "style guide" page I think. Check out this gulp task: https://github.com/pocotan001/react-styleguide-generator it sounds close.



来源:https://stackoverflow.com/questions/31475048/how-to-isolate-and-iterate-over-individual-react-components-in-a-react-applicati

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