ReactDOM.render deprecated ⚛️ React

Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead.

The app uses the legacy root API, so React 18 features (concurrent rendering, automatic batching) are disabled.

Seen on: React

Meaning

React 18 introduced createRoot; ReactDOM.render runs in legacy mode with a warning. React 19 removes it.

Common causes

  • Old index.js after upgrading to React 18
  • Libraries/tests still using render

⚡ Quick fix

  1. Switch to createRoot from react-dom/client
  2. Use @testing-library/react 13+ for tests

Detailed fix by platform

React

  1. jsx
    import { createRoot } from 'react-dom/client';
    createRoot(document.getElementById('root')).render(<App />);

How to diagnose

  1. Entry — Which file calls ReactDOM.render?
  2. Recent change — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.