当前位置: 首页 > 工具软件 > Fiber.js > 使用案例 >

如何解决控制台报:react_devtools_backend.js:4026 Warning: You are calling ReactDOMClient.createRoot

钱经业
2023-12-01

import React from 'react'

import { createRoot } from 'react-dom/client'

import store from './redux/store'

import App from './App.jsx'

const root = createRoot(document.getElementById('root'))

root.render(<App />)

store.subscribe(() => {

  root.render(<App />)

})

 类似资料: