How it works...

To view the Storybook app, we need to use the script we edited in the preceding section. Start by running the storybook script (it would be better to do this in a separate console) and then run the application itself, as follows:

// at one terminalnpm run storybook// and at another terminalnpm start

The first command produces a bit of output, allowing us to confirm that our script works and that all our stories were found. The following code was slightly edited for clarity:

> npm run storybook> chapter12b@0.1.0 storybook /home/fkereki/JS_BOOK/modernjs/chapter12> cp App.storybook.js App.js && rnstl && storybook start -p 7007Generating Dynamic Storybook File List Output file: /home/fkereki/JS_BOOK/modernjs/chapter12/storybook/storyLoader.js ...

Get Modern JavaScript Web Development Cookbook 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.