Skip to main content

React Is Awsome

In a react class, to avoid typing this.state or this.props all the time, a fancy alternative is to define some local constants:

const { buttonValue, onChangeHandler} = this.props;
const { input1, input2 } = this.state;


Comments