So I have Material UI Textfields that get some data from an API and here is my code. It works perfectly but I want to simplify it, and I have no idea on how to even do it. I was thinking of using a map, but not sure how to deal with the nested z elements. Any help would be appreciated a lot!
P.S. I am a beginner.
<div>
<TextField value={queryCache.getQueryData('x1').y1}/>
<TextField value={queryCache.getQueryData('x1').y2}/>
<TextField value={queryCache.getQueryData('x1').y3.z1}/>
<TextField value={queryCache.getQueryData('x1').y3.z2}/>
<TextField value={queryCache.getQueryData('x1').y4}/>
...
</div>