O'Reilly logo
  • 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

    Cover of Developing a React Edge: The JavaScript Library for User Interfaces

    Note

    JSX "IF" logic alternatives (if() {} doesn't work)