How to loop and render elements in React-native?

后端 未结 4 622
粉色の甜心
粉色の甜心 2020-12-24 04:28

Is it possible to loop an identical component in Render function?

Something like this:

...

onPress = () => {
 ...
};

initialArr = [[\"blue\",\"t         


        
4条回答
  •  醉酒成梦
    2020-12-24 05:15

    render() {
      return (
        
           {initialArr.map((prop, key) => {
             return (
               
             );
          })}
         
      )
    }
    

    should do the trick

提交回复
热议问题