---
title: "Comment by paddingleft on \"How to get the PREVIOUS state in React?\" | Hashnode"
description: "How about - setCount(prevCount =&gt; prevCount + 1)}"
url: "https://hashnode.com/posts/how-to-get-the-previous-state-in-react/613c565022b7a41dfe5fb88a/comment/613cb5121821961e2551ecb0"
---

[Discussion](https://hashnode.com/posts/how-to-get-the-previous-state-in-react/613c565022b7a41dfe5fb88a)

Comment [How to get the PREVIOUS state in React?](https://hashnode.com/posts/how-to-get-the-previous-state-in-react/613c565022b7a41dfe5fb88a)

[paddingleft](https://hashnode.com/@paddingleft)

[Sep 11, 2021](https://hashnode.com/posts/how-to-get-the-previous-state-in-react/613c565022b7a41dfe5fb88a/comment/613cb5121821961e2551ecb0)

How about - setCount(prevCount => prevCount + 1)}

[Karan Hejmadi](https://hashnode.com/@KaranHejmadi)

[Sep 12, 2021](https://hashnode.com/posts/how-to-get-the-previous-state-in-react/613c565022b7a41dfe5fb88a/comment/613cb5121821961e2551ecb0#reply-613da27322b7a41dfe5fd66c)

You can do that as well. setCount(prevCount => prevCount+1) gets the previous state and adds 1 to it. I think it works better if you have several setState in batches.
