Low level react animation API unable to make it work

Viewed 299

I was doing a bit of animation in my React application. I used ReactCSSTransitionGroup to add up the animations on page transition. But now I want to use the low level API ReactTransitionGroup but it's not working. I used:

import {ReactTransitionGroup} from 'react-addons-transition-group';

Then inside class I am rendering:

render() {
    const {user} = this.props;
    const styles = require('./App.scss');

    return (
      <div className={styles.app}>
        <ReactTransitionGroup component={React.DOM.html} transitionName="example">
          <div className={styles.appContent}>
            {this.props.children}
          </div>
        </ReactTransitionGroup>
      </div>
    );
}

I am unable to figure out what I'm doing wrong. I am getting this error:

React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components).

Please let me know what mistake I am making.

1 Answers
Related