I'm sure many have heard of Storybook [0]. I've used it pretty much since the start from ~2016 (back when Angular was cargo-culting it like mad). I've always had generally negative experiences with it:<p>1) Messy Javascript API resulting in inexpressive storybook files, particularly for big frameworks like Angular and big components.<p>2) Slow AF with webpack/terser/etc. And that's before you start bolting on crazy addons like compodoc.<p>3) Tries to solve so many different problems (just a subjective opinion of mine).<p>4) Insane levels of "framework magic", particularly when I've used it with Angular, but also in other scenarios too.<p>---<p>So, I wanted to ask HN to gauge the appetite for a similar but not same kind of Storybook:<p>1) Extremely expressive Javascript API. Think Jest.<p>2) Go CLI (allowing direct interface with ESBuild, etc.).<p>3) ESBuild-centric (rather than webpack, or worse, addons [1]).<p>4) Typescript-centric (rather than seeming like an after-thought).<p>5) Much less framework magic (think React, Redux, etc. Stick mostly to simple explicit JS behaviors).<p>6) Probably a lot more that haven't come to mind yet.<p>Before I go any further with it, it would be amazing to hear what you guys think about all of this. What are your thoughts about Storybook? Too much tech debt for them to modernize? Am I just being silly and picky about Storybook? Am I the crazy one?<p>I just think it would be amazing to have a frontend workshop app with the speed of esbuild, the expressiveness of jest and cypress, the elegance of React.<p>Thanks HN!<p>[0] https://storybook.js.org/<p>[1] https://storybook.js.org/addons/storybook-addon-turbo-build
I’ve tried out storybook 7 recently and it does seem a bit better, but I do agree with you that storybook is less than ideal. I see storybook in the same way I see a complex webpack config, I have no idea how it works and once it is finally set up I don’t touch it. I would love to see something as easy as Jest to install with a simple interface for writing and testing react code.<p>I think storybook tries to do too much, and I’d like to see a really dead simple interface with Vite or similar where I can easily prototype and test stuff based on *.stories.tsx or similar.<p>I don’t need all the stupid addons, just give me a dev server with navigation and routing built in, and an easy way to hide the whole interface to simulate a normal web page.
I think a single tool to solve design + testing would be great. Cypress does Component Testing now, and you can use it in a Storybook-esque fashion, but it doesn't export to a static site for documentation, and instead of using knobs/plugins, you automate with the Cypress API. It's missing some of the design touches of Storybook, though.<p>Storybook is good for design, but the testing integration is definitely lacking. Having to maintain <test suite in Jest> alongside <design suite> feels like a lot of code.
Coupled with DOMPurify [0], it helps much to simplify the messy JavaScript, HTML. Yin [1] has book on that.<p>[0]:<a href="https://github.com/cure53/DOMPurify" rel="nofollow">https://github.com/cure53/DOMPurify</a>
[1]:<a href="https://leanpub.com/react-wagtail" rel="nofollow">https://leanpub.com/react-wagtail</a>