PLEASE Stop Doing Conditional Rendering Like This...

preview_player
Показать описание

🌎 Follow me here:
Рекомендации по теме
Комментарии
Автор

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.

Lindaine
Автор

This is very useful for beginners, thank you.

perisha
Автор

sorry, noob question here
why use multiple if and return and not if else if and return?

a_maxed_out_handle_of__chars
Автор

Q: is it ok to throw those jsx inside the if statement into an object so we can iterate through it??

keshavkannan
Автор

What's the problem with &&?
Also, does this have any effect on improving rerendering lag?

aomafura
Автор

can we render conditionally using signals?

dereksniper
Автор

Greate Video, I agreed with you, I like the early return concept. Thank you

narutoking
Автор

you should use switch case and assign jsx to variable instead of return

markokraljevic
Автор

How does this compare to just using a map/object to store the rating number to title and placeholder

jairroy
Автор

You could slim this up even more since some of those cases are the exact same and only a variable changes.

YOitsBA
Автор

What's your opinion on conditional rendering with && vs ternary operator : ?

grandpaK
Автор

Why not use switch instead of the ifs?

Atmos
Автор

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

regilearn
Автор

Instead of this, I would have create an array of jsx code. And return from Question like this

return [....all my jsx code][rating];

whoman
Автор

I came here confused and i left more confused

jasongrant
Автор

I'll just stop using react and use vue

unknownguywholovespizza
Автор

I agree with you. But my boy, you need to work on cleaning up your code damn

lazyboi
Автор

could u do switch statement instead of doing if?

Rogueixpresents