Where to put files that would deploy after they were found?

Hi all. Tell me, please.
There is a project on react.
Component using the fetch gets the data.json (so it is necessary for the conditions), which lies in the project folder(currently in public)
const getPersonList = async () => {
 const response = await fetch("../data/data.json");
 const data = await response.json();

sendPerson(data);
 };

I have this project structure created by the create-react-app
5e986683f41e1821205513.jpeg
Locally everything works and the data file.json finds.
But when you deploy to github pages file finds and the console throws the error.
In which folder need to put this file what would after assembling it sasadilo?
April 19th 20 at 12:21
1 answer
April 19th 20 at 12:23
Solution
In public. Only the appeal to be without the " .. " because the public is available directly site.ru/data/data.json

Find more questions by tags ReactGitHub