Kasper Peulen a972ff2470
Merge pull request #19833 from storybookjs/kasper/expose-more-types
Expose more CSF types in all renderers
2022-11-16 10:17:59 +01:00
..
2022-11-13 20:37:10 +01:00
2022-11-14 17:12:13 +01:00
2022-07-21 11:24:07 +02:00
2022-11-14 14:18:39 +01:00

@storybook/client-api -- Deprecated Story APIs (storiesOf)

NOTE This API is deprecated, and the CSF format is preferred for all stories.

storiesOf API

The @storybook/client API provides the storiesOf() API, which is proxied through to the CSF API.

Internals

In order to appear to the store like the CSF API, a call to storiesOf().add() does the following:

  • Tracks the story added in a synthetic StoryIndex data structure
  • Constructs a moduleExports object that is equivalent to the exports from a CSF file that produced the same stories.

In order to achieve the old storySort functionality, the client API also needs access to the project annotations.