Friday, May 9, 2025
Latest:
  • Der kleine Vogel und die Sonne
  • German alphabet pronunciation
  • Command design pattern
  • German words with gender
  • When to use einen and keinen in German?
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

Fatal error: Uncaught Error: [] operator not supported for strings

May 15, 2019 beroza

What is type inference in TypeScript?

November 16, 2021 beroza

Write a program to find permutations

December 25, 2022 beroza

WordPress security tricks to secure Websites

February 7, 2021 beroza

What are new in Java 14 or new features of Java 14

August 4, 2020 beroza

Directory structure of Mac OS X for beginner

August 16, 2019 beroza

Avoid creating unnecessary objects in java

January 22, 2020 beroza

The following PHP extension is missing: curl AMP WordPress

January 16, 2020 beroza

What is Java annotation? Write some facts about Java annotation

January 25, 2019 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

Languages

  • EnglishEnglish
  • বাংলাবাংলা

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.