Answers for "call multiple functions in useeffect"

0

how to have a function inside useeffect

useEffect(() => {
  fetch(`https://jsonplaceholder.typicode.com/${query}`)
    .then(response => response.json())
    .then(json => setData(json));
}, [query]); // only re-run on query change
Posted by: Guest on May-06-2020
0

call multiple functions in useeffect

useEffect(() => {
    getUserData();
    getLocalWeather();
  }, []);
Posted by: Guest on August-18-2021

Code answers related to "call multiple functions in useeffect"

Browse Popular Code Answers by Language