Skip to content
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 Optimistic Updates example got TypeError (0 , $csb__react_dom.render) is not a function #4895

Open
a90100 opened this issue Mar 14, 2025 · 1 comment

Comments

@a90100
Copy link

a90100 commented Mar 14, 2025

Steps to reproduce the issue:

  1. Oepn the URL https://redux-toolkit.js.org/rtk-query/usage/examples#react-optimistic-updates
  2. Click to run the example and you will see the TypeError (0 , $csb__react_dom.render) is not a function

Image

The way I found to solve the issue:

Downgrade the react and react-dom packages to version 18.0.0.

There might be a better way to solve this issue, but I'm just providing a solution.

@markerikson
Copy link
Collaborator

Hmm. That's extremely odd, given that we don't even call the old ReactDOM.render() method:

worker.start({ quiet: true }).then(() =>
  ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
    <React.StrictMode>
      <ApiProvider api={api}>
        <ChakraProvider>
          <BrowserRouter>
            <App />
          </BrowserRouter>
        </ChakraProvider>
      </ApiProvider>
    </React.StrictMode>,
  ),
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants