import React, { Suspense } from 'react';
import './App.scss';
import Header from './components/Header/Header';
import { Route, BrowserRouter } from 'react-router-dom';
let TodoLazy = React.lazy(() => import('./components/Todo/TodoContainer'))
function App(props) {
return (
<BrowserRouter>
<div className="container">
<Header />
<main>
<Suspense>
<Route render={<TodoLazy />} path='/todo' />
</Suspense>
</main>
</div>
</BrowserRouter>
);
}
export default App;
ReactDOM.render(
<React.StrictMode>
<React.Provider state={state}>
<App />
</React.Provider>
</React.StrictMode>,
document.getElementById('root')
);
Object
todo:
todos: (3) [{…}, {…}, {…}]
__proto__: Object
__proto__: Object