React JSX: rendering nested arrays of objects

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

I have a component with the following render:

2条回答
  •  一个人的身影
    2020-12-22 09:29

    It's because you do not return anything inside the policyLegend map. Try this:

    {
        policyLegend.map((policy) => {
            return (
                

    { policy.displayName }

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

提交回复
热议问题