I basically understand the difference between object and function setState in React in terms of atomicity and resiliency to batch updates. 

```
// Subject to batching issues.
this.setState({
  x: this.state.x + 5
});

```

Or should I use:

```
// Atomic since previous state is known
this.setState((state, props) => {
  x: state.x + 5
});

```

However, I wonder what could be the advantages of using functional setState if previous state is irrelevant.

```
this.setState(() => {
  food: "Bars"
});

```