Skip to content
Advertisement

Why cant i use a function to fill a table in REACTJS

I wrote a function in REACTJS that helps me to read a JSON-File and to display the content of the JSON-File. When I use the code of the function inside of a body the display of the content works fine. But now i want to use the function to fill a table with the content of the JSON and it wont work – the page stays empty. Thank you in advance!

The Function:

JavaScript

Trying to use it to fill a table (Tabledata for Setting1):

JavaScript

Advertisement

Answer

You are not returning anything in your FillData function.

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement