Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

How to Write Stories

More detail and code guidelines will be broken down later, but for now let's talk about the overall concept.

We use Storybook for two purposes:

  1. To preview and test elements.
  2. As a reference for app development.

That means the content in Storybook is temporary

K.I.S.S.

Some general tips:

  • Do not have static, real data in a story. It should always be in an element.
  • Do have dynamic, mock data in a story - to simulate what will happen at runtime.
  • Do use Controls and props to pass that mock data in.
  • Do keep the directory structure of stories mostly synced with elements