Andrey Shmigelsky thinks this is interesting: Use ternary logic Set a variable and refer to it in the attribute Offload the switching logic to a function From 2. JSX from Developing a React Edge: The JavaScript Library for User Interfaces by The League of Extraordinary Developers Publisher: Bleeding Edge Press Released: November 2014 Note JSX "IF" logic alternatives (if() {} doesn't work) Share this highlight http://www.safaribooksonline.com/a/developing-a-react/78453/ Twitter Facebook Google Plus Email Get Instant Access Now Start a Free Trial Have an account? Sign in. Minimise Unlock the rest of this book and 30,000 other books and videos By clicking this box, you confirm that you have read and agree to the terms and conditions of our Membership Agreement, and you understand that when your trial period ends, you will be required to provide billing information if you wish to continue using the service. Unlock the rest of this book Start a Free 10-Day Trial loading Learn about Safari for Business Have an account? Sign in.