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

Fixing bug with routing while hosting app on AWS #6

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 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 `