---
title: "Discussion on \"useState hook\" | Hashnode"
description: "Discussion on \"useState hook\". useState is a React Hook . We call useState  inside a function component to add some local state to it. React will preserve this state between re-renders.\nlet us discuss how useState is used \nimport  { useState } from 'react';\n\nfunction Example() {\n ..."
url: "https://hashnode.com/posts/usestate-hook/6293c974d97f80b5091dbc1e"
---

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

Discussion

# [useState hook](https://harshitbharani.hashnode.dev/usestate-hook?utm_source=hashnode&utm_medium=feed)

useState is a React Hook . We call useState inside a function component to add some local state to it. React will preserve this state between re-renders. let us discuss how useState is used import { useState } from 'react'; function Example() { ...

May 29, 2022 · 3 min read · harshitbharani.hashnode.dev  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#react-hook-1](https://hashnode.com/tag/react-hook-1)
-   [#reacthooks](https://hashnode.com/tag/reacthooks)
-   [#react](https://hashnode.com/tag/react)
-   [#react-hooks](https://hashnode.com/tag/react-hooks)

## Written by

[Harshit Bharani](https://hashnode.com/@HarshitBharani)

@HarshitBharani · india

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

Student

I am student learning frontend development talking about react , javascript , web-development , typescript ,

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
