React tutorial in Hindi #18 Conditional rendering | If Condition

preview_player
Показать описание
In this react js tutorial for beginners series we learn how to make conditional rending and if-else in react js. This video is made by anil Sidhu in the Hindi Language.
Playlist for complete React series in Hindi

Basic Form
Make HTML form
Add some field
Use state for field data
Submit and control form
Interview Question
Рекомендации по теме
Комментарии
Автор

Fabulous explanation bro 😊😊😊 complet youtube me itni sahi explanation nhi mili conditions statement pe . Sab gol gol ghumate ha. Thx bro it’s very helpful for me 😊😊

anonymousbrand
Автор

Chalega sir kyuki variable me value assign krke sirf match krana h so it will execute without any errors
const loggedIn=1;

ZahidKhan-thpz
Автор

Very nice explanation sir ❤
And yes it works for variable too.

infotainment
Автор

yes we can use with variable (let logged = 1) like this

sapnakumari
Автор

hi sir, i am following your videos, yes i can understand you concept, but i have few query in react, so may i know could you provide the coaching also ?? if yes please do let me know.. thanks

RadheyNameKaSahara
Автор

Hello,

Thankyou so much for the great explaination of all the topics...

But in this topic I have a query...
That we use else if condition so why we are changing the state like 1, 2, 3? Is there any other common way to use that?

madhavidubey
Автор

sir I like to your teaching way.
thank you so much sir ❤❤❤

faizahmed
Автор

const loggedin =1 karate hai to chalata hai par variable ko update nai kar sakate function components me

codingssprint
Автор

What is the purpose of defining "setLoggedIn" here. If you are mutating the variable value below directly by using loggedIn state . it is clearly visisble that that setLoggedIn is defined here but never used. We can't mutate the variable directly we always have to use the copy of it ie- setLoggedIn in this case. small query please help?

shivamchawda
Автор

usestate ke jagha par koi or var bhi lenge toh chalega q ke hum ne pahle hi upar import kar diya na

faizahmed
Автор

Hi Sir,
How to use switch statement in react js.

hanumantbangar
Автор

sir how this conditional rendering be executed via button like if i press buton user1 comes then next click user2 and so on like toggle can we render this

RahulVerma-brbx
Автор

yeah we can use variable for conditional redering
ex: let v =1;

shorttutorials
Автор

Thanks For this video, Kya ham bina react ko import kiye useState ko import kar sakte hai??

sarwanverma
Автор

hlo brother hme if or else condition button k upr lagana hai

RiyazBaig-yqfy
Автор

sir hum bigineers hai AI ke karan hume job milegi ki nahi .kya hame padhayi chod deni chahiye

mayurchaudhari
Автор

Hello sir yeh hum useState me default value pass kr rahe hai uska ass a input box ke thro pass kr sakte hai then submit button se sumbit krne ke baad yeh show kare ki user 1login hai ya 2 login hai other wise jo bhi ho???

AmanTeach
Автор

Some in return method end() contain semi colon and sometimes not. Please reply

devinderkumarpandey
Автор

sir ek query hai sir fir else ka output kaise aayega

faizahmed
Автор

conditional operator using state
// import './App.css';
import {useState} from 'react'
function Profile()
{
const[loggedIn, setLoggedIn]=useState(2)
return(

<>
{
loggedIn===1?<h1>welcome rahul</h2>:<h3>welcome guest</h3>
}
</>
)
}
export default Profile;

SarojKumar-ztlg