작성
·
1.1K
1
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import Library from './chapter_03/Library';
import Clock from './chapter_04/Clock';
const root = ReactDOM.createRoot(document.getElementById('root'));
setInterval(() => {
root.render(
<React.StrictMode>
<Clock />
</React.StrictMode>
);
},1000);
답변 2
1
아마 TypeError: react_dom_client__WEBPACK_IMPORTED_MODULE_1__.render is not a function 오류가 난 것 아닌가 싶네요.
ReactDOM import 할 때 'react-dom'으로 해보세요
0