public
folder and call it _redirects
:_redirects
. This redirects all URLs in our deployed domain to /index.html
.
_redirectsdist
bundle of JavaScript that cannot behave differently to other URL parameters. (Specifically #3 response will be the same for /dogs/:id
and /cats/:id
.) Those rendering steps are done inside the React Router URL param logic only. We have to allow the app to accept any URL parameter and still serve the same index.html
file every time. React Router will then run render logic depending on the URL.