3 ms·
I actually generally include this in my Babel configuration: https://www.npmjs.com/package/jsx-control-statements https://www.npmjs.com/package/jsx-control-stat
by buchanaf 10y ago
I actually generally include this in my Babel configuration: https://www.npmjs.com/package/jsx-control-statements https://www.npmjs.com/package/jsx-control-statements.
People might argue that this isn't the React way of doing things, but it's easier than setting a conditional classname to display none. It's also easier than breaking out a small amount of html into a separate component just because you want some conditional display logic.