---
title: "Discussion on \"`useState` and `prevState`\" | Hashnode"
description: "Discussion on \"`useState` and `prevState`\". There's a way to update your React state more efficiently using the prevState with a callback in setState function.\nconst [name, setName] = useState('');\nconst [address, setAddress] = useState('');\nconst [phone, setPhone] = useState('');\n\n// we have ..."
url: "https://hashnode.com/posts/usestate-and-prevstate/640ab40907ae26b9361e746b"
---

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

Discussion

# [\`useState\` and \`prevState\`](https://quan-ng.hashnode.dev/usestate-and-prevstate?utm_source=hashnode&utm_medium=feed)

There's a way to update your React state more efficiently using the prevState with a callback in setState function. const \[name, setName\] = useState(''); const \[address, setAddress\] = useState(''); const \[phone, setPhone\] = useState(''); // we have ...

Mar 10, 2023 · 1 min read · quan-ng.hashnode.dev  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)

## Written by

[Quan Nguyen](https://hashnode.com/@quanng)

@quanng

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

Human learning

🇻🇳

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
