I work with json files of the following format:
[{"title": "SomeTitle",
"description": "someDescription"},
{"title": SomeTitle1,
"description": someDescription1}
...
]
I need to traverse the JSON file and dynamically generate React components with the same names as titles and the given descriptions. So the program needs to generate something like this:
<SomeTitle description={someDescription} />
<SomeTitle1 description={someDescription1} />
I need to run the script only once to generate all necessary components. Could anyone tell me how to approach this? Should I use something like React.createComponent() function? Thanks!