Controller
In this section, we will describe the controller and provide examples of its usage.
Overview
Adding a controller to a component or page
import ReactComponent from 'utils/ReactComponent';
import Component from './Component';
class ComponentController extends ReactComponent{
constructor(props) {
super(props);
this.state = {color: "red"};
}
render() {
return (<Component { ...{...this.props, ...this.state} } />);
}
}
export default ComponentController;Last updated