I tried a lot to get data from the json file that is in inside the reactjs project folder I even tried getting json data of package.json file that is inside the reactjs folder but still got error How can I locate/get data from local JSON file I kept getting only error as output
useEffect(() => {
axios
.get("http://localhost:3000/flat-trade/package.json")
.then(function (response) {
// handle success
console.log(response + "hello");
})
.catch(function (error) {
// handle error
console.log("error");
});
});