Ю
Size: a a a
Ю
VC
Ю
СГ
D
Д
Д
СГ
D
react-router-dom
Может я не там зарегистрировал роуты?const App = () => {
console.log('!!!!!!');
const currentUser = storage.getCurrentUser();
if (!currentUser) {
return <Redirect to="/reg" />;
}
return (
<>
<Home />
<Switch>
<Route exact path="/reg" component={RegistrationPage} />
<Route exact path="/auth" component={AuthenticationPage} />
<Route exact path="/" component={Home} />
</Switch>
</>
);
};
init.jsconst runApp = () => {
storage.initDataBase();
const store = configureStore({ reducer });
render(
<BrowserRouter>
<Provider store={store}>
<App />
</Provider>
</BrowserRouter>,
document.getElementById('root'),
);
};
index.jsD
D
console.log
- не работает кстатиДД
ЮЧ
ЮЧ
И
const audio = new
Audio(notify);
React.useEffect(() => {
audio.play()
}, [])
ДД
D
HistoryApiFallback
D
devServer: hot: true
реакту нужен обязательно react-hot-loader
?Д
ЮЧ