Answer the question
In order to leave comments, you need to log in
Where do you need to put the files so that after deploy they would be found?
Hello. Tell me please.
There is a project in react.
Using fetch, the component receives data.json (as required by 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);
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question