index.js 660 B

1234567891011121314151617181920
  1. import React from 'react';
  2. import ReactDOM from 'react-dom/client';
  3. import './index.css';
  4. import App from './App';
  5. import reportWebVitals from './reportWebVitals';
  6. // 路由配置
  7. import { RouterProvider } from 'react-router-dom';
  8. import router from './router';
  9. const root = ReactDOM.createRoot(document.getElementById('root'));
  10. root.render(
  11. <React.StrictMode>
  12. <RouterProvider router={router} />
  13. </React.StrictMode>
  14. );
  15. // If you want to start measuring performance in your app, pass a function
  16. // to log results (for example: reportWebVitals(console.log))
  17. // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
  18. reportWebVitals();