shelbourn / Globetrotter

A fun little demo travel app using React, React Hooks, React Router, Material-UI, live demo hosted on AWS in an S3 bucket
http://globe-trotter.s3-website.us-east-2.amazonaws.com
MIT License
1 stars 0 forks source link

:bug: Removing route redirect to fix bug with AWS #5

Closed shelbourn closed 4 years ago

shelbourn commented 4 years ago

Issue: While viewing the live demo on AWS and being on a route such as /create or /destinations, if you hit ctrl / cmd + r to reload the page or hit the reload button then the app throws a 404 error. This is because I had <Route exact path="/"><Redirect to="/create"/></Route> This works fine while using a local server, but with my current AWS bucket settings and app configuration, it tries to reload the /create route which only exists once the React DOM has mounted.

For now, I have fixed this by using this as the default route `