Re:React Cosmos – Build UIs at Scale
by scsilver on Tuesday March 02, 2021 @03:39AM
(#26313203)
Ive strung up spas within storybook so I have the component and the page its going into. Essentially you import the <App> and provide a store. It helps single responsibility principalize your code, and you are always focused on having well define components for your storybook library/dictionary.
[ Parent
| on HN ]
Do you have any examples you can share where you've customized Storybook in this manner?
If I understand correctly, as opposed to loading your components in isolation in Storybook, you're providing them with a context similar to the actual app they're going to exist in?
Not OP, but i suppose you can use custom decorator to wrap components and globalTypes for some customization, like theme selector
https://storybook.js.org/docs/react/essentials/toolbars-and-...
This sounds like a good use case for Playroom too