Skip to content

Commit

Permalink
Merge pull request #25435 from storybookjs/norbert/migration-note-rea…
Browse files Browse the repository at this point in the history
…ct18-manager

Manager: Add migration note about react 18
  • Loading branch information
ndelangen authored Jan 10, 2024
2 parents 0ba40c5 + 6db4d1d commit feb4a6a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<h1>Migration</h1>

- [From version 7.x to 8.0.0](#from-version-7x-to-800)
- [Manager addons are now rendered with React 18](#manager-addons-are-now-rendered-with-react-18)
- [Removal of `storiesOf`-API](#removal-of-storiesof-api)
- [Removed deprecated shim packages](#removed-deprecated-shim-packages)
- [Framework-specific Vite plugins have to be explicitly added](#framework-specific-vite-plugins-have-to-be-explicitly-added)
Expand Down Expand Up @@ -369,6 +370,26 @@

## From version 7.x to 8.0.0

### Manager addons are now rendered with React 18

The UI added to the manager via addons is now rendered with React 18.

Example:
```tsx
import { addons, types } from '@storybook/manager-api';

addons.register('my-addon', () => {
addons.add('my-addon/panel', {
type: types.PANEL,
title: 'My Addon',
// This will be called as a JSX element by react 18
render: ({ active }) => (active ? <div>Hello World</div> : null),
});
});
```

Previously the `key` prop was passed to the render function, that is now no longer the case.

### Removal of `storiesOf`-API

The `storiesOf` API has been removed in Storybook 8.0.
Expand Down

0 comments on commit feb4a6a

Please sign in to comment.