路由配置


npm install --save react react-dom
npm install [email protected] --save

路由配置_第1张图片
image.png
import React from'react';
import ReactDOM from 'react-dom';
import'./index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';

import { BrowserRouter,HashRouter,Route }from 'react-router-dom';

function home(){
return 

Home Page

} ReactDOM.render( ,document.getElementById('root') ); registerServiceWorker();

你可能感兴趣的:(路由配置)