Skip to content
Advertisement

Create a new row every three columns

I am trying to create a virtual shop and I want to make every row of products have four items on a large screen, three in medium, and two in smell.

My problem is that I can’t come up with a way to make it that every four items I iterate the item list a new row will be created. (I am getting the data from an API I created with Flask, the getting the data part works.)

Here is my code:

JavaScript

Advertisement

Answer

You are using props incorrectly.

JavaScript
Advertisement