Answer the question
In order to leave comments, you need to log in
How to display content of .json file in React JS?
There is a task - to display the contents of the clients.json file - in single blocks or in its entirety. I tried to do this by using asynchronous output via fetch, but for some reason nothing works and I get an error. Maybe there are other options how to parse this file? And then I rummaged through a bunch of sources, but nowhere did I find a clear solution to this problem.
Here is the code https://stackblitz.com/edit/react-clients-list
Please do not throw too many slippers - I'm just starting to learn React JS and there is no one to consult with on some nuances. Any constructive criticism is welcome and any help would be greatly appreciated.
Answer the question
In order to leave comments, you need to log in
Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.
Why is your function placed in Client1.js, but it does not return anything and generally looks like the wrong component?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question