Before starting to work with Storybook, make sure your site/project really needs it. I highly recommend this talk from Laura Elizabeth: https://vimeo.com/214120678
That being said, let’s get started :)
Storybook should help your project with testing, documentation, and knowledge-sharing (keeping all your knowledge in a central/accessible place).
Storybook is good at a lot of things: a component explorer, style guide, documentation site, playground (i.e. you can try all the states without having to trigger them in the app each time), sandbox, and UI library.
This gives the following advantages:
- great for QA
- great for stress testing all elements/components (for building bulletproof UI components)
- teammates can review UI without touching code or maintaining a local dev environment.
- making the on-boarding process easier for new developers, designers and teams = time saved
- adds an extra layer of security/reassurance for current or future company stakeholders (anyone that looks at the Storybook app can get a bird’s eye view of what we have already created)
Isolated environment
Storybook add-ons that can help your projects greatly
https://github.com/storybookjs/storybook/tree/master/addons/knobs#storybook-addon-knobs
For testing responsiveness, there's a handy tool called "Viewport" which allows you to view your components in various screen sizes and layouts:
https://github.com/storybookjs/storybook/tree/master/addons/viewport#storybook-viewport-addon
QA: Visual regression tests
Squarespace has multiple Storybooks. Visual regression testing each Storybook helps us automatically catch UI bugs.
–Daniel Duan, Software Engineer, Squarespace
QA: Accessibility audits
https://github.com/storybookjs/storybook/tree/master/addons/a11y#storybook-addon-a11y
Improved code quality
Additional advantages
Increased chance of catching all edge cases
Smart debugging
Better documentation
Comments and sharing (free version is limited to 2 users)
Sources:
https://levelup.gitconnected.com/why-you-should-always-use-storybook-when-developing-user-interfaces-4c69b93b2f65https://blog.hichroma.com/the-delightful-storybook-workflow-b322b76fd07
https://tsh.io/blog/storybook-js/
No comments:
Post a Comment