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
React 18 createRoot supports #18045
Comments
You need to wait for version ^6.5 or use some of the alpha or beta versions. Keep in mind that as an "alpha/beta" version not all bugs are fixed. |
Try upgrading to the latest 6.5 prerelease:
That will fix user code. Storybook's own UI is written in React 17, so it may also generate a warning. But that's safe to ignore for now. We'll rewrite the UI in React 18 for SB 7.0 which is coming next. |
It looks like in the latest version of storybook (6.5.9) still uses old ReactDOM.render method instead of createRoot. Are there plans to change it? |
@latata do you have a reproduction of this? it should use the new root API if you're using react18 in your project. More info here: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#react18-new-root-api |
@shilman Here is a repo which has just 2 commits (CRA init, then storybook init), which reproduces the issue: https://github.com/bstaruk/storybook-18045 edit: Using node 16.15.0 |
storybook/lib/ui/src/index.tsx Line 101 in b4bf826
|
I have the same problem. Do you know how to solve it, even if it is a temporary solution? |
Temporary solution - just ignore it. It is warning in Storybook UI, not in your components. |
Hi @Semigradsky, but my components don't loading correctly, are always in an inifinite loading loop: |
@niug I don't think that this is related to warning. Latest stable storybook (6.5.9) works great with React 18 for me. |
ok @Semigradsky, I'm using this version, here it's my package.json: Some idea why don't load the component page? Thanks. |
@niug I have no idea. Create a new issue with a link to a reproducible demo |
I saw comment from @shilman how to fix but doesn't work |
@vladgorbachev why did you write it here? It is totally different issue, open your own. Also, you use |
Closing this as fixed by #17215 This is available in 6.5+ |
Feature looking for React 18 createRoot in storybook
https://reactjs.org/blog/2022/03/08/react-18-upgrade-guide.html#updates-to-client-rendering-apis
I'm getting warning as follow,
Currently I'm using following version,
The text was updated successfully, but these errors were encountered: