blitz-js / legacy-framework

MIT License
2 stars 2 forks source link

After installing Chakra UI the browser console shows "ReactDOM.render is no longer supported in React 18" error #169

Closed crushjz closed 2 years ago

crushjz commented 2 years ago

What is the problem?

After installing Chakra UI and using the ChakraProvider in _app.tsx, the console shows an error.

The app looks like it working without any issue tho.

Paste all your error logs here:

Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot

Paste all relevant code snippets here:

N/A

What are detailed steps to reproduce this?

Run blitz -v and paste the output here:

macOS Big Sur | darwin-x64 | Node: v14.18.1

blitz: 0.44.4 (local)

  Package manager: yarn
  System:
    OS: macOS 11.6.1
    CPU: (8) x64 Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz
    Memory: 411.20 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.18.1 - /var/folders/pd/0byzc6293tb6hxcjx0gv845r0000gp/T/yarn--1640973755524-0.3587530327117221/node
    Yarn: 1.22.17 - /var/folders/pd/0byzc6293tb6hxcjx0gv845r0000gp/T/yarn--1640973755524-0.3587530327117221/yarn
    npm: 8.3.0 - ~/.nvm/versions/node/v14.18.1/bin/npm
    Watchman: Not Found
  npmPackages:
    @prisma/client: 3.7.0 => 3.7.0
    blitz: 0.44.4 => 0.44.4
    prisma: 3.7.0 => 3.7.0
    react: 18.0.0-beta-149b420f6-20211119 => 18.0.0-beta-149b420f6-20211119
    react-dom: 18.0.0-alpha-5ca4b0433-20211020 => 18.0.0-alpha-5ca4b0433-20211020
    typescript: ~4.5 => 4.5.4

Please include below any other applicable logs and screenshots that show your problem:

image

crushjz commented 2 years ago

Looks like Chakra UI doesn't support React v18 yet: https://github.com/chakra-ui/chakra-ui/issues/4360#issuecomment-895062052

beerose commented 2 years ago

Hi @crushjz, the app and chakra-ui should work even despite the warning. Right now we can't do much before they upgrade to React 18. As there soon will be stable React 18, they will probably prioritize it. I'm closing this issue then.