React JSX: rendering nested arrays of objects

后端 未结 2 1961
盖世英雄少女心
盖世英雄少女心 2020-12-22 09:21

I have a component with the following render:

2条回答
  •  别那么骄傲
    2020-12-22 09:25

    You are not returning the JSX from your map method. Once you return the JSX you formed :

    policyLegend.map(function(policy) {
                  return (

    { policy.displayName }

    { policy.values.map(value => { return( ); }) }
    ) })

    You should get the result you're looking for

提交回复
热议问题