Consider this example:
var foo;
if (this.state.bar) foo = <Foo/>;
<TransitionGroup transitionName='baz'>
{foo}
</TransitionGroup>
If state is false or undefined, foo will be undefined and React.addons.TransitionGroup will throw Uncaught TypeError: Object.keys called on non-object
Consider this example:
If
stateis false or undefined,foowill beundefinedand React.addons.TransitionGroup will throwUncaught TypeError: Object.keys called on non-object