Answer the question
In order to leave comments, you need to log in
React router + Node.js - how to disable server access when routing?
I use react-redux-router on the client, server on Node.js + Express.js.
There is such a construction:
When going to the url, the Content component is not rendered, but tries to go to the url and gives an error.
How to disable the transition? Or is there a more "correct" way? <Route path="/tickets" component={Content}/>
Answer the question
In order to leave comments, you need to log in
Depending on what you mean by "going by url":
1) If you entered the url in the address bar of the browser and pressed enter, it is clear that there will be a call to the server
2) If you have already logged into your SPA, click on the link and instead of drawing the desired component - a request is made to the server: it means you have a bug somewhere. Either the whole application fell off, or you somehow configured the router incorrectly
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question