---
title: "Discussion on \"Having objects as dependencies in React useEffect hook\" | Hashnode"
description: "Discussion on \"Having objects as dependencies in React useEffect hook\". In this article, I gave an overview on what the  useEffect hook is , pointed out an issue in having objects as dependencies and how to go about this issue."
url: "https://hashnode.com/posts/having-objects-as-dependencies-in-react-useeffect-hook/62fd05ae0cfd6de8c7d785cf"
---

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

Discussion

# [Having objects as dependencies in React useEffect hook](https://haybeecodes.hashnode.dev/having-objects-as-dependencies-in-react-useeffect-hook?utm_source=hashnode&utm_medium=feed)

In this article, I gave an overview on what the useEffect hook is , pointed out an issue in having objects as dependencies and how to go about this issue.

Aug 17, 2022 · 7 min read · haybeecodes.hashnode.dev  
Updated Aug 31, 2022  
Read the article

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

## Written by

[Abass Oguntade](https://hashnode.com/@haybeecodes)

@haybeecodes · Nigeria

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

Front End Developer | Building stuff for the web | React | Next JS

Arranging pixels using React.

## Responses 2

Markdown supported · ⌘↵ to post

[Mitja Potočin](https://hashnode.com/@PanchoSansa)

[Aug 21, 2022](https://hashnode.com/posts/having-objects-as-dependencies-in-react-useeffect-hook/62fd05ae0cfd6de8c7d785cf/comment/63023c6b428d2725de1a8d34)

I think there is a mistake in this article.

“ If count’s value is same, the callback effect function ( first argument of useEffect hook ) is called”

If the valu is the same, the useEffect callback will not be run and vice versa.

[Abass Oguntade](https://hashnode.com/@haybeecodes)

[Aug 24, 2022](https://hashnode.com/posts/having-objects-as-dependencies-in-react-useeffect-hook/62fd05ae0cfd6de8c7d785cf/comment/63023c6b428d2725de1a8d34#reply-63067f9679f56556d0cb862f)

Thanks for pointing that out! Fixed already.

[Amujo Babatunde](https://hashnode.com/@Mejor)

[Aug 19, 2022](https://hashnode.com/posts/having-objects-as-dependencies-in-react-useeffect-hook/62fd05ae0cfd6de8c7d785cf/comment/62ff7dca8bec3d0c4588bdb6)

Thanks for this article，I know have a better understanding of useEffect hook

[Abass Oguntade](https://hashnode.com/@haybeecodes)

[Aug 24, 2022](https://hashnode.com/posts/having-objects-as-dependencies-in-react-useeffect-hook/62fd05ae0cfd6de8c7d785cf/comment/62ff7dca8bec3d0c4588bdb6#reply-63063ecc79f56556d0cb7cd8)

Welcome.
