---
title: "Discussion on \"Does the object reinitialized when the component re-renders in React\" | Hashnode"
description: "Discussion on \"Does the object reinitialized when the component re-renders in React\". In short answer, yes!  \nso in this specific case where you use any non-primitive (object or array) as a dependency of useEffect. It cause the useEffect to fire the code everytime the component re-renders.  \nThe component re-renders everytime the butt..."
url: "https://hashnode.com/posts/does-the-object-reinitialized-when-the-component-re-renders-in-react/661755c056eac0db2522f84a"
---

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

Discussion

# [Does the object reinitialized when the component re-renders in React](https://alexthecoder.hashnode.dev/does-the-object-reinitialized-when-the-component-re-renders-in-react?utm_source=hashnode&utm_medium=feed)

In short answer, yes! so in this specific case where you use any non-primitive (object or array) as a dependency of useEffect. It cause the useEffect to fire the code everytime the component re-renders. The component re-renders everytime the butt...

Apr 11, 2024 · 1 min read · alexthecoder.hashnode.dev  
Read the article

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

## Written by

[Yihshen Lee](https://hashnode.com/@AlexTheCoder)

@AlexTheCoder

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

a web development beginner

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
