Object.assign and React's setState work differently. For Object.assign, you can think of it as a right-to-left merge of the objects:
Object.assign(a,{b:a.b+2},{b:a.b+4});
Object.assign(a,{b:3},{b:5});
Object.assign(a,{b:5});
However, setState is a different story. It is an asynchronous operation. In your case, you're simply executing the exact same statement three times:
this.setState({ value: 0 + 1});
this.setState({ value: 0 + 1});
this.setState({ value: 0 + 1});
Multiple setState calls can update state in one event loop and result in a single re-render. Part of the architectural efficiency behind the way setState works may be responsible for this behaviour. This reference may also be helpful:
Why is setState giving me the wrong value?
If you want to use the previous value of a setState operation, you can do somthing like this:
setState((prevState) => ({ value: prevState.value + 1 }));
or
setState({ value: this.state.value + 1 }, () => {
// In here, the state has been updated
});
However, it's hard to give a precise practical solution as your example is contrived and there would probably be no practical need to do sequential setState operations like that.
See the React documentation for more details on setState.