Ian VanSchooten 1926153a70 Merge remote-tracking branch 'origin/next' into deps-cleanup
# Conflicts:
#	code/lib/addons/package.json
#	code/lib/blocks/package.json
#	code/lib/client-api/package.json
#	code/lib/core-client/package.json
#	code/lib/core-common/package.json
#	code/lib/preview-web/package.json
#	code/lib/source-loader/package.json
#	code/yarn.lock
2022-09-05 17:29:49 -04:00
..
2022-08-12 22:21:22 +02:00
2022-07-21 11:24:07 +02: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.