---
title: "Discussion on \"Lazy state initialization with React\" | Hashnode"
description: "Discussion on \"Lazy state initialization with React\". If you are familiar with the useState hook in React, you know that it's a function that's called each time our component renders.\nThe function returns an array of two values, and we usually use JavaScript destructuring to both declare a variable for ..."
url: "https://hashnode.com/posts/lazy-state-initialization-with-react/5ffe0012b00f7510ee9585a2"
---

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

Discussion

# [Lazy state initialization with React](https://jameswilliams.hashnode.dev/lazy-state-initialization-with-react?utm_source=hashnode&utm_medium=feed)

If you are familiar with the useState hook in React, you know that it's a function that's called each time our component renders. The function returns an array of two values, and we usually use JavaScript destructuring to both declare a variable for ...

Jan 12, 2021 · 5 min read · jameswilliams.hashnode.dev  
Read the article

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

## Written by

[James Williams](https://hashnode.com/@jameswill1ams)

@jameswill1ams

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

## Responses 1

Markdown supported · ⌘↵ to post

[Richy Condon](https://hashnode.com/@rcondon)

[Jul 14, 2022](https://hashnode.com/posts/lazy-state-initialization-with-react/5ffe0012b00f7510ee9585a2/comment/62d03d106b0f8eeb0e066fdf)

[James Williams](https://hashnode.com/@jameswill1ams)

Fancy meeting you here!

Can you mail me? richy.condon@gmail.com

Been looking to get back in contact for a while now.
