Transition group example for ternaries

Author: peterwiebeCreated Oct 16, 2024Updated Oct 16, 2024

The example for transition group to animate in/out elements is with an array. I haven't had time to dig into the code but are we not able to use a ternary?

javascript
<TransitionGroup>
  { isFirstItemVisible ? (
      <CSSTransition>
         ...
      </CSSTransition>
  ) : (
      <CSSTransition>
         ...
      </CSSTransition>
  )}
</TransitionGroup

Source: reactjs/react-transition-group