问题
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