Controller

In this section, we will describe the controller and provide examples of its usage.

Overview

Controllers in UncodiePro are designed to provide programmers with an environment to extend the functionalities of an Uncodie component or page. Adding a controller to a component or page

Adding a controller to a component or page

1 - Select the desired component or page.

2 - Navigate to the "Controller" section.

3 - Modify the controller code to apply the desired logic to the component.

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

Was this helpful?