Search code examples
reactjsgithub-pages

React App Component Not rendering on GitHub Pages. Works locally


None of my react components render when I use github pages. My CSS seems to work (I can see the background pattern) but none of my react components render. Everything works fine locally, but it does not when I use github pages. Here is a link to my repo: https://github.com/GibbsV3/MySite I have tried using the Router component but so far I cannot figure it out. Is there something wrong with my index.html file?


Solution

  • Github pages works for static pages.
    But react is not static page. Your index.html file interacts with javascript and adds contents, components. There are some ways you can deploy react-app to github pages but I would recommend using vercel or netlify