文档地址:https://react.docschina.org/docs/getting-started.html 主要介绍了ReactJS的基本内容与基本语法
执行成功后显示页面
使用vscode编辑器打开项目 项目目录结构显示 入口文件src/index.js
import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import App from './App'; import * as serviceWorker from './serviceWorker'; ReactDOM.render( <React.StrictMode> <App /> </React.StrictMode>, document.getElementById('root') ); // If you want your app to work offline and load faster, you can change // unregister() to register() below. Note this comes with some pitfalls. // Learn more about service workers: https://bit.ly/CRA-PWA serviceWorker.unregister();这样一个React项目也算是搭建起来了,接下来进行学习路由的配置