Комментарии:
Based
Ответитьsorry, noob question here
why use multiple if and return and not if else if and return?
I came here confused and i left more confused
ОтветитьWhat's the problem with &&?
Also, does this have any effect on improving rerendering lag?
could u do switch statement instead of doing if?
ОтветитьI'll just stop using react and use vue
ОтветитьQ: is it ok to throw those jsx inside the if statement into an object so we can iterate through it??
ОтветитьGreate Video, I agreed with you, I like the early return concept. Thank you
ОтветитьWhy not use switch instead of the ifs?
ОтветитьInstead of this, I would have create an array of jsx code. And return from Question like this
return [....all my jsx code][rating];
how about using switch case in <Question/>?
ОтветитьThis is a very important video tbh, it's better to have smaller components that handles its own simple logic than one big component that handles everything.
ОтветитьBeginners like it! 🙂
Ответить++++++++++++++++++🙂
Ответитьyou should use switch case and assign jsx to variable instead of return
ОтветитьI agree with you. But my boy, you need to work on cleaning up your code damn
ОтветитьWhat's your opinion on conditional rendering with && vs ternary operator : ?
ОтветитьYou could slim this up even more since some of those cases are the exact same and only a variable changes.
ОтветитьSwitch will be more cleaner😊
ОтветитьHow does this compare to just using a map/object to store the rating number to title and placeholder
Ответитьawesome,and can you do a video on how to,render tooltip ,model,popup depending on condition, like if sucess ,warning ,etc... with different color,based on condition it should change the entire color of the component, so that we can reuse the component
ОтветитьThis is very useful for beginners, thank you.
ОтветитьGreat video tom!
Ответить