-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Investigation]: Support React 19 #29805
Comments
I don't think we want to upgrade any direct dependencies, as that would be a breaking change, at least if we did it in |
it's released now |
Would appreciate if these storybook/code/renderers/react/package.json Lines 96 to 97 in 052f6ce
|
Hey @silverwind they should support both React 19 prereleases and |
Ah, you are right, it's not an issue. I wasn't aware that prerelease ranges are satisified by release versions. This works with npm for me without getting a {
"dependencies": {
"@storybook/react": "8.4.7",
"react": "19.0.0"
}
} |
It seems
If I downgrade to React 18.x it works as expected. Reproduction: // .storybook/manager.tsx
import { addons, types } from '@storybook/manager-api';
addons.register('test', () => {
addons.add('test', {
type: types.TOOLEXTRA,
title: 'test',
paramKey: 'test',
render: (props: any) => <>test</>,
});
}); |
Can confirm that post-React19 upgrade, everything works with the latest version of Storybook (8.4.7) with the exception of our in-house addons: we have encountered the same error as @kerryj89. Temporarily disabling the addon works for now 👍 |
I'm getting this error when I try to launch Storybook with React 19:
This is my main.ts config: import type {StorybookConfig} from '@storybook/react-vite';
import {mergeConfig} from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths';
const config: StorybookConfig = {
addons: [
'@storybook/addon-links',
{
name: '@storybook/addon-essentials',
options: {
backgrounds: false,
grid: false,
measure: false,
outline: false,
},
},
'@storybook/addon-interactions',
],
docs: {},
framework: {
name: '@storybook/react-vite',
options: {
builder: {
viteConfigPath: '.storybook/vite.config.ts',
},
},
},
stories: ['../app/**/*.stories.tsx'],
viteFinal: async (viteConfig) =>
mergeConfig(viteConfig, {
plugins: [tsconfigPaths()],
}),
};
export default config; |
Thanks a lot for reporting @kerryj89 @terrymun! I have a PR that will fix that issue: #30003 @stevensacks is React 19 the only variable that makes this fail? I don't see a connection with the error message you provided. Could you please try downgrading to React 18 and see whether it works? |
Hei Yo, |
There are a number of bundled dependencies in storybook that have incompatible types (mostly due to still using the global |
Thanks for the quick fix @yannbf! Do you know if this is being backported to 8.4? Or will it be in 8.5+? |
+1 |
Describe the bug
React 19 has been released. We should investigate all the changes that are needed to fully support it.
To users:
You should be able to use Storybook with React 19, but if you found any inconsistency or unsupported feature, please let us know in this issue.
The text was updated successfully, but these errors were encountered: