by unleashit on 3/13/24, 8:14 PM with 36 comments
by unleashit on 3/13/24, 10:21 PM
For those wondering what the use case is, you must not have tried it. It does take work to set up (with each version that's less), but it can be very nice to test in isolation esp in cases where a component is under a login, the 4th page of a 10 page form, etc. Also obviously if you're working on a component library that ships without an app, Storybook can be your development and/or demo app.
by diegof79 on 3/13/24, 10:03 PM
The main issue is that Storybook provides an interface for the server and transpiler/compiler process. So, if you already have Webpack, Vite, Parcel, or Next, you’ll need to configure SB to work with your toolchain. After many frustrations, I created an ad-hoc page using the import.meta.glob from Vite in my latest projects. Loading files utilizing a sub-set of SB CSF is easy, and that crappy ad-hoc playground covers 80% of my use cases, with the possibility of migrating to SB if I need more.
SB is very useful for anyone doing a DS, but now is too big for my needs.
by Etheryte on 3/13/24, 9:12 PM
[0] https://github.com/dependabot/dependabot-core/issues/2521
by technojunkie on 3/13/24, 10:31 PM
That said, I wish this was at a place where I could easily use it for the UI layer with simple integration into a given CMS. As others have stated, it's great in isolation and for demos. Also, I realize that most apps and CMSes are so opinionated and using Storybook for the view of that system is a lot of overhead.
One less than stellar example is WordPress. It's technically possible to create a headless app using Next.js or Remix on the front-end, Gutenberg for the data layer and authoring, and Storybook as the source of truth for both ends. However, it was so much work to get there.
Maybe a legacy PHP system trying to be modern isn't a great example. But, then I'm stuck with any flavor of, usually paid database hosted, software like Contentful or Sanity. Again, the overhead!
I am a huge advocate for design systems that translate into component libraries, and Storybook fills part of that gap, but it'd be huge to see this type of setup become more practical.
by mm263 on 3/13/24, 10:03 PM
The only one I can think of is developing a UI library, but for the usual SPA development, it seems to me that MSW provides a much smoother and less obtrusive dev experience without affecting how my app is architected.