3 Reasons why I stopped using React.setState
Michel Weststrate
2.1K44

I’m wondering how many re-renders will happen in case of changing many observables used in render, e,g.

@observable one = 1;
@observable two = 2;
...
makeChange(){
this.one++;
this.two = 3;
}
...
render(){ /*used both of them */}

vs

this.setState({one: 1, two: 2})

So in case of setState it should obviously trigger 1 re-render cause it’s async action, but how about observables example? 1 or 2?