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

IIFE mention in "If-Else in JSX"? #4141

Closed
lukehorvat opened this issue Jun 16, 2015 · 4 comments
Closed

IIFE mention in "If-Else in JSX"? #4141

lukehorvat opened this issue Jun 16, 2015 · 4 comments

Comments

@lukehorvat
Copy link
Contributor

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.

@zpao
Copy link
Member

zpao commented Jun 16, 2015

Sure, would you be interested in writing something up?

@lukehorvat
Copy link
Contributor Author

No problem. With or without code example?

@zpao
Copy link
Member

zpao commented Jun 16, 2015

A code example might be useful (and would hopefully help prevent followup questions where people will surely have a problem with using this)

@syranide
Copy link
Contributor

Related reactjs/react-future/issues/35

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