Check out example codes for "css grid wrap columns". It will help you in understanding the concepts better.

Code Example 1

Use this if you are trying to wrap your rows in css grid like with
flex-wrap.

grid-template-columns: repeat(auto-fill, <your-size>px);

Learn ReactJs, React Native from akashmittal.com