NatKarmios

Untitled

Oct 27th, 2020
852
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const MyComponent = () => {
  2.   const [isTriggered, setIsTriggered] = useState(false);
  3.   useEffect(() => {
  4.     if (isTriggered) {
  5.       // do stuff
  6.     }
  7.   }, [isTriggered]);
  8. }
RAW Paste Data