И
const isAuth = async () => {
try {
const res = await getUserData();
console.log(res);
} catch (e) {
console.log(e);
}
};<Switch>
<Route path="/" onEnter={isAuth}>
<RootPage />
</Route>
</Switch>
Size: a a a
И
const isAuth = async () => {
try {
const res = await getUserData();
console.log(res);
} catch (e) {
console.log(e);
}
};<Switch>
<Route path="/" onEnter={isAuth}>
<RootPage />
</Route>
</Switch>
VM
DT
ТФ
И
ТФ
V
A
AT
DT
VS
BB
С
VS
ТФ
<Route path="/articles/:slug" component={Article} exact />F
F
ТФ
DT
<Route path="/articles/:slug" component={Article} exact />VS