Answer the question
In order to leave comments, you need to log in
React-router paths don't work. How to cure?
I've been fighting for a day now and I can't figure out why the routes don't work.
Here, for example, such a route
<Route path="chart" component={Chart}>
<Route path=":id" component={Test} />
</Route>
scripts.js:1 Uncaught SyntaxError: Unexpected token <
Answer the question
In order to leave comments, you need to log in
Very similar to the error with "issuing a script", i.e.
you don't have script.js there, but index.html is given. See network.
Described in detail in the react-router tutorial in Russian
before :id tried / add?
tried to use DefaultRoute?
have you tried adding a name?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question