Home > Mobile >  React Router URL on github pages
React Router URL on github pages

Time:03-21

I've a live site on Github Pages.

It has URL:

example.com/frontend-challenges

it is a app that contain another app like

example.com/frontend-challenges/app-1
example.com/frontend-challenges/app-2
example.com/frontend-challenges/app-3

I'm using ReactJS/React Router. But whenever I try to access example.com/frontend-challenges/app-1 without enter example.com/frontend-challenges first Github coulnd't find it.

How to overcome this? URL:

https://yoga1234.github.io/frontendmentor-challenges/

CodePudding user response:

This is for your app is a SPA, and GitHub Pages don't support it. Here's an instruction to bypass this problem:

https://github.com/rafgraph/spa-github-pages#usage-instructions

  • Related