-
Notifications
You must be signed in to change notification settings - Fork 47.3k
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
IIFE mention in "If-Else in JSX"? #4141
Comments
Sure, would you be interested in writing something up? |
No problem. With or without code example? |
A code example might be useful (and would hopefully help prevent followup questions where people will surely have a problem with using |
Related reactjs/react-future/issues/35 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
If-Else in JSX
page only offers up ternary expressions as a solution to conditional logic inside JSX. But perhaps IIFEs should also get a mention?Realizing I could do IIFEs inside JSX helped "flesh out" my mental model of how JSX actually works, so I suspect it would aide others in the same way as well. Furthermore, with the advent of ES6 arrow functions, they aren't too verbose either.
A code example utilizing an IIFE might be overkill, but at least a passing mention would be nice.
The text was updated successfully, but these errors were encountered: