You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Of course i tried <RealComponent/> that contains useEffect, replace , assign , history.push, useNavigate, and so on.)
When i input /404.php in address bar and press enter, i can successfully access it.
That means Nginx was set correctly.
When i input a non-exist path such as /hello, Nginx tried to return React, then React catches it.
Until now, it is okay and should be like this.
Normally, React should jump to /404.php,
But, URL in address bar changed to /404.php, and React still searching if there's a Route matched.
Then it find it cannot match. Redirect to /404.php again. Match again. And then again and again.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I don't want React handles paths out of Routes,
So i used
(Of course i tried
<RealComponent/>
that contains useEffect, replace , assign , history.push, useNavigate, and so on.)When i input /404.php in address bar and press enter, i can successfully access it.
That means Nginx was set correctly.
When i input a non-exist path such as /hello, Nginx tried to return React, then React catches it.
Until now, it is okay and should be like this.
Normally, React should jump to /404.php,
But, URL in address bar changed to /404.php, and React still searching if there's a Route matched.
Then it find it cannot match. Redirect to /404.php again. Match again. And then again and again.
Beta Was this translation helpful? Give feedback.
All reactions