A first look at Storybook

I'm a full-stack developer from South Africa 🇿🇦. I love writing about JavaScript, HTML and CSS.
Search for a command to run...

I'm a full-stack developer from South Africa 🇿🇦. I love writing about JavaScript, HTML and CSS.
No comments yet. Be the first to comment.
Most of you know me for my consistency, a golden arrow in my blog series. I've written 1000 articles in 1008 days! Almost an article a day, and my honeymoon was the only holiday I ever took. I'm super proud of this achievement; it has been a fantasti...

It's not the first time I'll be talking about community. I think it's an essential aspect of any successful tool. This shows in my previous explorations of Astro, Medusa, and now Vendure as well. All these products thrive in a super open, welcoming, ...

The cool part about Vendure is how easy it is to set up and how abstract each layer is. Basically, we get the following elements: External database Server Worker Admin UI Frontend While this is amazing, it also brings a bit of complexity when it co...

The previous article looked at customizing Vendure on a data and process level. In this article, we'll look at customizing emails, as they are often a big part of a webshop system. We'll be looking at two different layers of customization for customi...

Even though Vendure is a pretty significant project out of the box, in some cases, we might want to go in and modify some elements to work to our specific use case. In this article, I'll take a high-level look at some elements we can customize within...

So you might have heard about Storybook, not children's stories, but the one for developers.
It's a frontend system (a workshop, they call it) for building UI components and pages. This allows you to create more stable components and test and document them.
Storybook provides a way for developers to create components and pages in isolation. This means you can focus on how that individual element should behave, its options, and so on.
Eventually, you write your story for the component and define the different states it can be in.
After this, we get a couple of cool features:
You'll be able to reuse the test in Storybook in other testing frameworks as well.
Besides these points, it also provides documentation for your team. Colleagues can find components easily and see what they should look like.
I'm super intrigued to give Storybook a try, as we use many custom components (like, really a lot!). This becomes a pain to maintain as some code someone else writes might accidentally impact a component.
I'm writing this series around Storybook to try it before implementing it. I want to experience what it's like and if it can be helpful.
But, with that said, there will be times when it will be sheer overkill for your project. For instance, when you rely solely on an external component library, you can use Storybook, but it will take longer to set up and doesn't really bring much value.
There is also another level of how long it will take to set up Storybook. If your application is tiny, you may like to test it manually. But in most cases, you'd be benefited from having some visual system in place.
I'm super hyped to try it and follow my newsletter if you are, too, as we will be exploring it in detail over the next couple of articles.
Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on Facebook or Twitter