Практика React JS #3 – Вывод всех товаров
Гоша Дударь · 3,718 words · 19 min read · EN

Below is the complete, readable transcript of Практика React JS #3 – Вывод всех товаров by Гоша Дударь on YouTube. Read the full text, copy any part you need, or generate a transcript for any video with our free tool.
Hello, during this lesson, we will work on how to see all the products on the pages of our online store. Before we begin, I would like to recommend the website aikiprager dot com. On this website, you will find code for homework and a lot of other useful information. The link to this lesson on the website
will be in the description of this video. Go ahead and
click on it. You won't regret it. The first thing we will do now is create an array that will contain all the products on our website. In the future, you can store all these products in a database. Then, you will simply connect to this database, take records from there, and display them on the page of your website. It is important to
understand that the principle of interaction with all these records, namely, displaying them on the pages of interaction with them in terms of the shopping cart. All this functionality will not differ depending on whether these products are inside your project in an array or whether these products will be in a database. Therefore, at the moment, we are doing it a little
simpler: we just create an array. But in the future, if you work with a database, then all this functionality that we will now write will not differ in any way. So let's create an array by itself. To create an array, I suggest changing our component a little bit, and instead of it being
just a function, we'd better create a class. In order to correctly register the component here in the form of a class, we need to import an object called the same as react, but this object is imported from the react library. Now we just create a class here. This class will be called about. This class should
Transcribe another video
Paste any YouTube, Instagram or TikTok link to get a free transcript.