DEV Community

Gülsen Keskin
Gülsen Keskin

Posted on • Edited on

React Versiyon Düşürme

npm install --save --save-exact react@versiyonNo
npm install --save --save-exact react-dom@versiyonNo

Module not found: Error: Can't resolve 'react-dom/client' hatası alırsanız index.js dosyasını aşağıdaki kod'la değiştirin.

index.js:

import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';

ReactDOM.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>,
  document.getElementById('root')
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
reportWebVitals();
Enter fullscreen mode Exit fullscreen mode

kaynak: https://stackoverflow.com/questions/71913692/module-not-found-error-cant-resolve-react-dom-client

Top comments (0)