Using switch in React JSX

Publié le: 04 septembre 2022
sur la chaîne: Dev Leonardo
2,096
58

In case you have a state that can have multiple values, an enum for some literals, for example, you might want to use a switch statement but you can't inside the jsx part of your code. Well, actually you can with the IIFE, or Immediately Invoked Function Expression.

_______________________________
Hit like and subscribe for more content! :D

You can also follow me on the other platforms:
Twitter:   / balastrong  
TikTok:   / balastrong  
Instagram:   / devbalastrong  
dev.to: https://dev.to/balastrong
GitHub: https://github.com/Balastrong
_______________________________


Sur cette page du site, vous pouvez voir la vidéo en ligne Using switch in React JSX durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Dev Leonardo 04 septembre 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 2,096 fois et il a aimé 58 téléspectateurs. Bon visionnage!