I have an array of objects in React Native. What is the simplest way to map them two on a row like in the following picture:
https://i.stack.imgur.com/VGWTr.png
I have a function that converts an array into an array of arrays of 2 elements:
{/* Example input: [0, 1, 2, 3, 4, 5, 6, 7] */}
{/* Example output: [ [0, 1] , [2, 3] , [4, 5] , [6, 7] ] */}
then simply map each element into a View that contains two other View elements, but seems way too overkill.
Is there a simpler method?
question from:
https://stackoverflow.com/questions/65601315/react-native-map-elements-two-on-a-row 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…