Skip to content

Commit

Permalink
Add details about React version for addon-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kylegach committed Jan 18, 2024
1 parent 5074a88 commit 4267381
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/writing-docs/mdx.md
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,15 @@ If you're still encountering issues, we recommend reaching out to the community

If you turned off inline rendering for your stories via the [`inline`](../api/doc-block-story.md#inline) configuration option, you would run into a situation where the associated controls are not updating the story within the documentation page. This is a known limitation of the current implementation and will be addressed in a future release.

### The React version used is unexpected

For most projects, Storybook's addon-docs uses the React version listed in your project's dependencies. If it does not find one, it will use React 18.2.0. There are two exceptions to this:

- Preact projects will always use React 17
- Next.js projects will always use the canary version that comes with the Next.js version installed, regardless of which React version is listed in the project’s dependencies.

If you're having issues with the React version used, you may need to re-create your project's `node_modules` folder to ensure the correct version is used.

**Learn more about Storybook documentation**

- [Autodocs](./autodocs.md) for creating documentation for your stories
Expand Down

0 comments on commit 4267381

Please sign in to comment.