import { Router, Route, Switch, useParams } from 'react-router-dom'; import { createBrowserHistory } from "history"; import { createStore, combineReducers, applyMiddleware } from 'redux'; import { Provider } from 'react-redux'; import { authReducer, promiseReducer, actionAuthLogin, frontEndReducer, actionRootCats } from './reducers'; import { CLoginForm, CMainAppBar, COrdersList } from "./Components"; import { CLogout } from './Components'; import { CSidebar } from './Components/Sidebar'; import thunk from 'redux-thunk'; import { CRootCats } from './Components'; import './App.css'; import { CCategory } from './Components/Category'; export const history = createBrowserHistory(); export const store = createStore(combineReducers({ promise: promiseReducer, auth: authReducer, frontend: frontEndReducer }), applyMiddleware(thunk)); store.subscribe(() => console.log(store.getState())) //console.log(useParams) store.dispatch(actionAuthLogin(localStorage.authToken)); store.dispatch(actionRootCats()); console.log('TTTTT' + performance.now()) const NotFound = () =>
Edit src/App.js
and save to reload.