<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: James Proneir</title>
    <description>The latest articles on DEV Community by James Proneir (@james_proneir).</description>
    <link>https://dev.to/james_proneir</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3774987%2Fa7984db9-a60e-4ac6-8af0-1699a7a50760.png</url>
      <title>DEV Community: James Proneir</title>
      <link>https://dev.to/james_proneir</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/james_proneir"/>
    <language>en</language>
    <item>
      <title>Why My React App Showed a White Screen After Deploying to GitHub Pages</title>
      <dc:creator>James Proneir</dc:creator>
      <pubDate>Mon, 16 Feb 2026 22:06:26 +0000</pubDate>
      <link>https://dev.to/james_proneir/why-my-react-app-showed-a-white-screen-after-deploying-to-github-pages-3c13</link>
      <guid>https://dev.to/james_proneir/why-my-react-app-showed-a-white-screen-after-deploying-to-github-pages-3c13</guid>
      <description>&lt;p&gt;When I deployed my React project to GitHub Pages, everything looked fine during development.&lt;br&gt;
But after hosting it, I was greeted with a completely white screen.&lt;br&gt;
No errors visible. Just blank.&lt;br&gt;
The Confusion&lt;br&gt;
I checked the browser console and noticed that my JavaScript and CSS files were not loading.&lt;br&gt;
The URLs looked like this:&lt;br&gt;
/assets/index.js&lt;br&gt;
/assets/index.css&lt;br&gt;
At first, I thought these were normal local paths.&lt;br&gt;
After all, in my simple HTML projects, I use:&lt;br&gt;
assets/index.js&lt;br&gt;
And they work perfectly even when hosted.&lt;br&gt;
So why was this failing?&lt;br&gt;
What I Discovered&lt;br&gt;
The issue was the leading slash /.&lt;br&gt;
A path starting with / tells the browser:&lt;br&gt;
“Start searching from the root of the domain.”&lt;br&gt;
So instead of searching inside:&lt;br&gt;
username.github.io/my-project/&lt;br&gt;
It searched from:&lt;br&gt;
username.github.io/&lt;br&gt;
That means it was looking for:&lt;br&gt;
username.github.io/assets/index.js&lt;br&gt;
But my files were actually inside:&lt;br&gt;
username.github.io/my-project/assets/index.js&lt;br&gt;
So the files were never found — resulting in a white screen.&lt;br&gt;
Why It Worked Locally&lt;br&gt;
In my local HTML projects, I use:&lt;br&gt;
assets/index.js&lt;br&gt;
This is a relative path.&lt;br&gt;
It tells the browser:&lt;br&gt;
“Start searching from the current folder.”&lt;br&gt;
That’s why it works both locally and when deployed.&lt;br&gt;
The Lesson&lt;br&gt;
There are three types of paths:&lt;br&gt;
Absolute URL → &lt;a href="https://example.com/file.js" rel="noopener noreferrer"&gt;https://example.com/file.js&lt;/a&gt;&lt;br&gt;
Root-relative → /file.js&lt;br&gt;
Relative → file.js or ./file.js&lt;br&gt;
That day I learned that a leading slash / is not a local path.&lt;br&gt;
It is root-relative.&lt;br&gt;
And that small difference broke my entire deployment.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>github</category>
      <category>javascript</category>
      <category>react</category>
    </item>
  </channel>
</rss>
