Stories as documentation
Storybook is much more than a convenient place to isolate your components while they're developed. With add-ons, it's also an effective tool for documenting your components. As your application grows, it's all the more compelling to have something like Storybook in place. Other developers are likely going to have to work with components that you've created. Wouldn't it be nice if they could look at Storybook stories to see the various ways your component can be used?
The last add-on that we'll look at in this chapter is called Info. It provides usage info about the component in a nicely-presented format, in addition to the standard rendered component output.
Let's create a couple of components that we want to document. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access