---
title: "Discussion on \"useEffect !== componentDidMount\" | Hashnode"
description: "Discussion on \"useEffect !== componentDidMount\". One of useEffect's uses is to perform an effect when a component is first mounted, and not to repeat it.\nHowever, React's compiler always breathes down your neck about adding dependencies to useEffect's dependency array.\nMost of the time, sure, the d..."
url: "https://hashnode.com/posts/useeffect-componentdidmount/6096312921068818a5c60d4c"
---

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

Discussion

# [useEffect !== componentDidMount](https://tobias-sample.co.uk/useeffect-componentdidmount?utm_source=hashnode&utm_medium=feed)

One of useEffect's uses is to perform an effect when a component is first mounted, and not to repeat it. However, React's compiler always breathes down your neck about adding dependencies to useEffect's dependency array. Most of the time, sure, the d...

May 8, 2021 · 1 min read · tobias-sample.co.uk  
Read the article

-   [#reacthooks](https://hashnode.com/tag/reacthooks)

## Written by

[Tobias S](https://hashnode.com/@bruceji7)

@bruceji7 · Seoul, South Korea

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

Front-End Developer in Seoul

I'm a Front End Developer in Korea. I work for a company called Lunit, that develops AI software to diagnose cancer. From the UK, I came to Korea as an English teacher, and managed to retrain myself, and break out into the programming industry 😎

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
