---
title: "Comment by Darlan Tódero ten Caten on \"Simplify your React code using shorter setState syntax\" | Hashnode"
description: "Good content, I agree and already use the tips in my code. The last example can be even shorter (and easy to read) because you are not using the prevState : thi"
url: "https://hashnode.com/posts/simplify-your-react-code-using-shorter-setstate-syntax/5fb0be9bb69caa470a3c3d43/comment/5fb1512503f7294d0e3a864a"
---

[Discussion](https://hashnode.com/posts/simplify-your-react-code-using-shorter-setstate-syntax/5fb0be9bb69caa470a3c3d43)

Comment [Simplify your React code using shorter setState syntax](https://hashnode.com/posts/simplify-your-react-code-using-shorter-setstate-syntax/5fb0be9bb69caa470a3c3d43)

[Darlan Tódero ten Caten](https://hashnode.com/@darlantc)

[Nov 15, 2020](https://hashnode.com/posts/simplify-your-react-code-using-shorter-setstate-syntax/5fb0be9bb69caa470a3c3d43/comment/5fb1512503f7294d0e3a864a)

Good content, I agree and already use the tips in my code.

The last example can be even shorter (and easy to read) because you are not using the _prevState_:

```
this.setState({ numbers: [] });
```

[Yogesh Chavan](https://hashnode.com/@myogeshchavan97)

[Nov 15, 2020](https://hashnode.com/posts/simplify-your-react-code-using-shorter-setstate-syntax/5fb0be9bb69caa470a3c3d43/comment/5fb1512503f7294d0e3a864a#reply-5fb1602b03f7294d0e3a874d)

Thank you [Darlan Tódero ten Caten](https://hashnode.com/@darlantc).

You're right, the last example can be further simplified as suggested by you because we're not using the previous state value.
