Lemoncode/react-by-sample

New sample state callback

brauliodiez opened this issue · 0 comments

Create a new sample, starting from 03 State.

Destination folder _misc/00 state-callback

In this sample we will talk about the async nature of setState and how can we buscribe to a callback to ensure we have that chane applied.

Tips

  setUserNameState = (newName : string) => {      
    this.setState({userName: newName}, this.nameChanged );
  }

  nameChanged() {

  }

This issue will be assigned to @maximo-calero