React Integration

Using ActiveUI with React

Using the React API #

const MyReactComponent = activeUI.doSomething(/* ... */).toReactComponent();

class MyClass extends React.Component {
  render() {
    return <MyReactComponent />;
  }
}

Using the DOM API #

The code manipulating the API has to be placed in the componentDidMount method:

class MyClass extends React.Component {
  render() {
    return <div ref={el => (this.element = el)} />;
  }
  componentDidMount() {
    // ** Your code goes here! **

    activeUI.doSomething(/*...*/).within(this.element);
  }
}