Thanks, I have not done much in the world of React, outside of my own curiosity. I have seen and used IIFE's pretty regularly in some older angularJs apps. Used mostly for the ability to work on some logic without affecting the global window of properties. I'll have to take a look at React's do-expression.
React is just one example where IIFE can be useful though the use case I was referring to applies anywhere where you need/want an expression and need to perform some logic.
do-expressions is a new js feature but isn't limited to react either.
Gotcha, re-read what you stated, makes sense when thinking about something like a ternary operation not quite fitting the bill.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.