Sign Up

welcome

Already have an account? Sign In

Sign In

welcome

Sign Up
Login with Google

Don't have account, Sign Up Here
Sign In Sign Up

letsrectify

letsrectify
  • Home
  • About Us
  • Contact Us
  • Jobs
Ask a Question
Home
Jaskaran Singh
Asked: 01-04-22

How to cleanup useEffect hook in react.js ?

  • 4

Cleanup UseEffect Hook

 

useEffect( () => {

   //Api function Calling

   let unAmounted = false;

   if (!unAmounted) {

      getOrderCategory();

    }    

       //Hook Clean Up    

       return () => {      

             unAmounted = true;

       };

  }, []);

Share
  • Facebook

0 More Answers

  • Answers
Cancel reply

Sidebar

Ask A Question
letsrectify

Categories

  • Technology
  • Food
  • Health
  • Sports
  • Science
  • Politics
  • Marketing

Policies

  • Terms & Conditions
  • Privacy Policy

About Us

  • About Us
  • Contact Us
  • Feedback

© 2025 All Rights Reserved by
Letsrectify.com