K
K
kamelot432021-04-13 14:56:01
React
kamelot43, 2021-04-13 14:56:01

How to return status 404 in SPA when accessing a non-existent page?

Guys, welcome. Tell me please, is it possible in a react-application to return not only a custom 404 page, but also return a 404 status in the status code when switching to a non-existent page? now I always have access to the 404 page returns a status 200 . Can be similar examples where it is possible to peep implementation? (using react router for routing)

607586cb7208d228989177.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
odd-look, 2021-04-13
@odd-look

https://reactrouter.com/web/example/no-match

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question