-


Product List for {this.props.name}



Download 8,6 Mb.
Pdf ko'rish
bet23/37
Sana18.01.2022
Hajmi8,6 Mb.
#383795
1   ...   19   20   21   22   23   24   25   26   ...   37
Bog'liq
Designing Applications with Spring Boot 2.2 and React JS Step-by-step guide to design and develop intuitive full stack web applications by Dinesh Rajput (z-lib.org)

Product List for {this.props.name}
   
   
Samsung A6 Plus
   
iPhone X Plus
   
Vivo V15 Pro
   
   
   );
   }
}
We can use the following React component in your JSX code:
We have used props in the React components. Now we will see how to use the state in the React components in the next section.
Using state in React components
In the React components, the data comes from the state. We need to create stateful components in our front-end application where the data
should be rendered and not create an unnecessary stateful component to reduce the complexity of the React application. In the following sample
code, we will how to create a stateful component in React using the ES6 syntax:
import React from ‘react’;
class ProdosApp extends React.Component {
   constructor(props) {
   super(props);
this.state = {
product1: “Samsung A6 Plus”,
product2: “iPhone X Plus”,
product3: “Vivo V15 Pro”


}
}
   render() {
   return (
   
   

Download 8,6 Mb.

Do'stlaringiz bilan baham:
1   ...   19   20   21   22   23   24   25   26   ...   37




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish