wewq
wewq

Reputation: 229

Why should I use storybook with React?

I am new to React and came across tool as storybook. The question is Why do we need to use storybook? and what problems does it solve?

Upvotes: 2

Views: 2051

Answers (2)

Ron Adin
Ron Adin

Reputation: 127

Storybook provides a way to develop and test React components in isolation from your application. This allows you to focus on developing each component without worrying about how it will fit into the rest of your application. Storybook also provides a way to share your components with others, so they can see how they work and provide feedback.

Upvotes: 0

Marcin
Marcin

Reputation: 831

You do not need to use Storybook obviously. But in many cases it can be helpful. Storybook helps developing you own components and see its behavior outside your application.

For example, you are preparing a special button component which is styled according to the app branding and you would like to develop only this particular thing, add and check styles check how it reacts to events etc. You can do it in isolation instead of running the whole app to make you work possible.

Having some years of experience ahead I would however strongly recommend using such approach like Storybook. It's really helpful. Moreover, a friend of mine start using Cypress to test only components and its behavior as a kind of unit tests.

Upvotes: 3

Related Questions