Answer the question
In order to leave comments, you need to log in
Why is there an error when following a direct link in React?
There is a construction in React -
<BrowserRouter>
<div className="app">
<Switch>
<Route exact path="/">
<Home />
</Route>
<Route path="/about">
<About />
</Route>
<Route path="/contacts">
<Contacts />
</Route>
<Route
path="/blog/:id"
render={(props) => {
return <CurrentArticle {...props} />;
}}
/>
<Route path="/blogs">
<Blog />
</Route>
<Route>
<NotFound />
</Route>
</Switch>
</div>
</BrowserRouter>
server {
server_name mysite.ru;
root /var/www/mysite/build;
index index.html;
location / {
try_files $uri $uri/ $uri.html =404;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question