Sunday, October 5, 2025
Latest:
  • German Pronouns with Nominative, Accusative, and Dative cases
  • German articles for the nominative, accusative, and dative cases
  • Der kleine Vogel und die Sonne
  • German alphabet pronunciation
  • Command design pattern
Upokary

Upokary

Quality information

  • Health
  • Life
  • Fashion
  • Food
  • Code
  • English
  • বাংলা
Technology 

What is useEffect hook in React? How to use useEffect hook?

Published: February 9, 2021Last updated: February 9, 2021

What is useEffect?

In React useEffect is a hook for encapsulating code that has side-effects. useEffect is triggered after the render method is called.

Why we need useEffect?

We mainly use useEffect for the following usage:

  • Fetching data
  • Reading from local storage
  • Registering and deregistering event listeners

useEffect lifecycle

react hooks lifecycle

Reference:
https://blog.logrocket.com/guide-to-react-useeffect-hook/

You May Also Like

ReferenceError: localStorage is not defined

April 10, 2021 beroza

Parsing error: Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment

August 23, 2019 beroza

Write a program to generate a string with characters that have odd counts

June 8, 2022 beroza

Render raw HTML with script tag using reactjs

February 20, 2020 beroza

What are the new features of EcmaScript6?

March 12, 2019 beroza

How to get the current timestamp in JavaScript?

May 10, 2020 beroza

How to create MySQL user with all privileges?

May 17, 2019 beroza

How to map all quotation marks to double quote?

June 8, 2022 beroza

How to install free SSL to nginx with let’s encrypt on ubuntu 18.04?

June 5, 2020 beroza

Why Upokary?

Upokary.com is a useful application in everyday life. It provides very handy information regarding every aspect of life. Each and every tip of upokary.com is meant to make life better.

Upokary tools

  • Youtube thumbnail
  • Youtube video downloader

Useful Links

  • Handy code
  • Technology
  • People
  • Programming
  • Quote
  • Travel
  • WordPress
  • IELTS
  • Kids

Pages

  • Sitemap
  • Privacy policy
  • About us
  • Contact us

Support

For any kind of query or question please drop a message in the following email: upokary@gmail.com
Copyright © 2025 Upokary. All rights reserved.