1 | # `@storybook/client-api` -- Deprecated Story APIs (`storiesOf`)
|
2 |
|
3 | **NOTE** This API is deprecated, and the CSF format is preferred for all stories.
|
4 |
|
5 | ## `storiesOf` API
|
6 |
|
7 | The `@storybook/client` API provides the [`storiesOf()` API](../core/docs/storiesOf.md), which is proxied through to the CSF API.
|
8 |
|
9 | ### Internals
|
10 |
|
11 | In order to appear to the store like the CSF API, a call to `storiesOf().add()` does the following:
|
12 |
|
13 | - Tracks the story added in a synthetic `StoryIndex` data structure
|
14 | - Constructs a `moduleExports` object that is equivalent to the exports from a CSF file that produced the same stories.
|
15 |
|
16 | In order to achieve the old `storySort` functionality, the client API also needs access to the project annotations.
|