Nice! I ran into the same issue hosting React apps on GitHub Pages. Fortunately they also allow you to workaround by redirecting 404s. 🙂
Ummm, I thought Github pages only serve 1 page and that you cannot have any kind of routing 🧐. I ended up using react's state instead of react router dom to serve all pages content within the home page.
react router dom
There are a couple of ways, see here: itnext.io/so-you-want-to-host-your...
Ohh yeah. cool hack, Always happy to see some good hack that saves the day! Thanks Kevin!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice! I ran into the same issue hosting React apps on GitHub Pages. Fortunately they also allow you to workaround by redirecting 404s. 🙂
Ummm, I thought Github pages only serve 1 page and that you cannot have any kind of routing 🧐. I ended up using react's state instead of
react router dom
to serve all pages content within the home page.There are a couple of ways, see here: itnext.io/so-you-want-to-host-your...
Ohh yeah. cool hack, Always happy to see some good hack that saves the day! Thanks Kevin!