Skip to content
Advertisement

show 2 items per row[react native]

I am learning react native and in all the tutorials i see ListView has been used with only 1 items per row. I have not used ListView, though. I have only 6 items that has to be shown as flat grid with 2 items per row and should be responsive. I know its a basic question, but i have tried from my side too which can be seen in the image

enter image description here

This is my code

JavaScript

Advertisement

Answer

To make a 2 row grid using ListView you could use this code as an example:

JavaScript

Change styles to choose how many rows you want to see on screen. This code is responsive.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement