Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditional Rendering #20

Open
VetDeveloper opened this issue Aug 15, 2023 · 2 comments
Open

Conditional Rendering #20

VetDeveloper opened this issue Aug 15, 2023 · 2 comments

Comments

@VetDeveloper
Copy link
Collaborator

Популярный кейс - условный рендеринг.

Хочу обратить ваше внивание на https://legacy.reactjs.org/docs/conditional-rendering.html#inline-if-with-logical--operator . На мой взгляд, конструкция хорошо вписывается в подобные варианты (главное - не злоупотреблять):

image

Обращаю внимание, что ваша задача не бездумно переделывать то, на что я указываю, а анализировать, отвечать (если того требует ситуация), а далее уже решать, стоит ли внести правки.

@Emil307
Copy link
Collaborator

Emil307 commented Aug 16, 2023

согласен, но в целом критической разницы нет. В будущем можно использовать

@BodySites
Copy link
Collaborator

Да, в целом разницы нет, но при этом сокращается размер конструкции, так что можно будет использовать

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants