title: reactjs local vs deployed issue
body: <p>I have a issue with my reactjs app created with create-react-app. As soon as the app loads it makes an AJAX request to load a json file in the public folder of myapp. </p>
  
  <p>On my local development machine it works if I set path for the json file as "myapp/data.json".</p>
  
  <p><a href="http://localhost:3000/myapp" rel="nofollow noreferrer">http://localhost:3000/myapp</a></p>
  
  <p>But when I deploy to github pages, it does not work. To make it work on github pages I have to change the path to "data.json". </p>
  
  <p><a href="https://githubid.github.io/myapp" rel="nofollow noreferrer">https://githubid.github.io/myapp</a></p>
  
  <p>But then it stops working on local development machine.</p>
  
  <p>How can I make this work on both local and gh-pages deployment work without having to change path each time.</p>