---
title: "Discussion on \"Understanding useEffect in React\" | Hashnode"
description: "Discussion on \"Understanding useEffect in React\". This article gives an indepth explanation of useeffect react hook which was established in the react library in 2014."
url: "https://hashnode.com/posts/understanding-useeffect-in-react/63cfc59e868addd9bfe05c7b"
---

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

Discussion

# [Understanding useEffect in React](https://kpealecodes.hashnode.dev/understanding-useeffect-in-react?utm_source=hashnode&utm_medium=feed)

This article gives an indepth explanation of useeffect react hook which was established in the react library in 2014.

Jan 24, 2023 · 5 min read · kpealecodes.hashnode.dev  
Read the article

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

## Written by

[Kpeale Legbara](https://hashnode.com/@Kpealecodes)

@Kpealecodes · Port Harcourt, Nigeria

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

Frontend Developer | Believer | Technical writer

## Responses 1

Markdown supported · ⌘↵ to post

[Favourite Jome](https://hashnode.com/@Favourite)

[Jan 24, 2023](https://hashnode.com/posts/understanding-useeffect-in-react/63cfc59e868addd9bfe05c7b/comment/63cfeb8d79a109e4ff157569)

Nice of you to share your understanding of the useEffect hook kpeale 🎉, it was a good read. Though there are some things I'd say weren't clear, like the cleanup function.

Essentially the cleanup function runs when a component unmounts, that is when you leave that component to maybe view another component.

Keep up the good work though, and keep sharing your thought, in no time you'd be a guru at React 🤩

[Kpeale Legbara](https://hashnode.com/@Kpealecodes)

[Jan 24, 2023](https://hashnode.com/posts/understanding-useeffect-in-react/63cfc59e868addd9bfe05c7b/comment/63cfeb8d79a109e4ff157569#reply-63d02fe379a109e4ff1581ac)

Thank you so much for this feedback. I did not know that the cleanup function runs whenever a component unmounts. Infact,, I only knew it for useEffect Hook! Thank you so much, I will read more on it

[Favourite Jome](https://hashnode.com/@Favourite)

[Jan 24, 2023](https://hashnode.com/posts/understanding-useeffect-in-react/63cfc59e868addd9bfe05c7b/comment/63cfeb8d79a109e4ff157569#reply-63d03e8f1acaeae4c9da7b8f)

You're welcome [Kpeale Legbara](https://hashnode.com/@Kpealecodes)
