News for hackers. Stuff that matters.
Re:React Cosmos – Build UIs at Scale by pedalpete on Monday March 01, 2021 @05:24PM (#26309286)
I was thinking the same re: Storybook. Though I was trying to figure out what benefit Cosmos may have over storybook?

I'm using Storybook with React-Native, and it does feel like I'm developing web components, and then trying to use them in an app later, but that's my only real complaint with Storybook.

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.
Re:React Cosmos – Build UIs at Scale by sbarre on Tuesday March 02, 2021 @08:19AM (#26314974)
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?

Re:React Cosmos – Build UIs at Scale by artboomy on Tuesday March 02, 2021 @08:51AM (#26315279)
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-...

Re:React Cosmos – Build UIs at Scale by meagher on Tuesday March 02, 2021 @09:53AM (#26315904)
This sounds like a good use case for Playroom too

https://github.com/seek-oss/playroom