❤ React报错问题分析
❤️ You passed a second argument to root.render(…) but it only accepts one argument.
You passed a second argument to root.render(…) but it only accepts one argument.
react-dom.development.js:86 Warning: You passed a second argument to root.render(…) but it only accepts one argument.
♥ 原因
导入两个组件,需要将两个组件放在一个容器内
const root = ReactDOM.createRoot(document.getElementById('root'))
root.render(<><Header></Header>,<Footer></Footer></>
);