React JS - How do I bind json data to a dropdown list

后端 未结 4 1249
星月不相逢
星月不相逢 2021-02-10 08:39

I have a react JS file and I\'m attempting to bind data to a dropdown list. The data is stored in the following testing API/json file: https://api.myjson.com/bins/okuxu ...I wan

4条回答
  •  长发绾君心
    2021-02-10 09:03

    In React, you use a declarative approach instead of DOM manipulation:

    {['clientName', 'siteName', 'segmentName'].map(key => ( ))}

    This generates the 3 dropdowns with the options populated.

提交回复
热议问题