[英]Why is create-react-app not importing component by default in App.js when creating a new app?
[英]React not importing App.js file correctly
在根(第 9 行)中,您需要渲染 App 组件以查看其内容...
root.render(
<App />
);
React 的最新更新要求它以当前语法进行布局:
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
<BrowserRouter>
<App />
</BrowserRouter>
</React.StrictMode>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.