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. ...

Get React 16 Tooling now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.