DEV Community

Discussion on: Creating 404 page in react using React Router

Collapse
 
jamesthomson profile image
James Thomson

Perhaps you could call it a "soft 404" whereas a servers response would be a "hard 404"?

Collapse
 
learnwithparam profile image
Paramanantham Harrison

Yes that’s right. It’s a soft 404 in client side

Collapse
 
gypsydave5 profile image
David Wickes • Edited

This is really interesting to me. An artifact of the transport layer (the HTTP status code) has made it into the application layer. We're expecting the SPA to 'act' like a web browser, showing a 404 from a server when a resource (URL) is not found.

But it's not a web browser; it's a self contained JavaScript application. The artifact is actually from a completely different architectural model. Are we adding to the confusion if we start calling this error state a 404?

(I'm not trying to say there's a right way or a wrong way - I'm just trying to point out how weird this is when you think about it).