Looking into integrating storybook into the company's projects and would love to hear from some of you about your experience with storybook, how did it help in large scale projects and if it was worth it?
Is storybook so good that is has become a must have in large scale projects for you?
Top comments (4)
I mostly love it.
The good:
The bad:
Overall: I highly recommend it, especially for large teams, but understand that the initial configuration may be very frustrating.
Appreciate you taking the time to write this down for me and other people who are thinking about integrating storybook into their projects.
Is there like a template/preset you use to configure storybook to your wishing?
Also regarding redux, have you ever included redux into your stories? If so how did it go?
No problem.
Configuration
For setting it up, I follow the docs to start with. They ask you to run the command
npx sb init
which does a pretty good job overall. For example, if you were using a create-react-app project, I think you would be good to go straight away.In my case, I use things like CSS modules and aliases, which I've coded in webpack:
I've had to copy those in the storybook config file, main.js
For anything else, it's the same process. I don't know of a faster way except going through step by step and making sure things are working.
Redux
Most of the time I don't include Redux. I export the unconnected components and use those in the stories.
If you want to include Redux sometimes, again you've got to get creative. There are many options:
There are also options for making this global for every story.
Overall, I don't think there is a simple and easy answer. As I mentioned, I think configuring storybook and working with things like Redux is troublesome. Thankfully, you only need to configure this kind of stuff once for the most part.
Storybook is the best! I always include it in every UI project I work on now.
I wrote about this awhile ago if you're interested: levelup.gitconnected.com/why-you-s...
The tl;dr is that Storybook is great for: