---
title: "Discussion on \"Does setstate method in react update the state immediately?\" | Hashnode"
description: "Discussion on \"Does setstate method in react update the state immediately?\". When you update two states one after another using setState and if the second state variable is dependent on the previous updated state, it may not show cor"
url: "https://hashnode.com/posts/does-setstate-method-in-react-update-the-state-immediately/61dfc4b22b381d6ddc3b1619"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Does setstate method in react update the state immediately?](https://harishwrites.hashnode.dev/does-setstate-method-in-react-update-the-state-immediately?utm_source=hashnode&utm_medium=feed)

When you update two states one after another using setState and if the second state variable is dependent on the previous updated state, it may not show cor

Jan 13, 2022 · 2 min read · harishwrites.hashnode.dev  
Read the article

-   [#reacthooks](https://hashnode.com/tag/reacthooks)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#frontend-development](https://hashnode.com/tag/frontend-development)
-   [#interview](https://hashnode.com/tag/interview)

## Written by

[harish kumar](https://hashnode.com/@harish07)

@harish07

  
[View profile](https://hashnode.com/@harish07)

ReactJS

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
