I have multiple values I'm listening to and different actions to perform for those values. Problem is that I don't know what is the best way to prevent them from running on first render. Let's say I have:
const [firstValue, setFirstValue] = useState();
const [secondValue, setSecondValue] = useState();
const [thirdValue, setThirdValue] = useState();
const [fourthValue, setFourthValue] = useState();
const [fifthValue, setFifthValue] = useState();
useEffect(()={
// action 1
},[firstValue, secondValue, thirdValue])
useEffect(()={
// action 2
},[fourthValue])
useEffect(()={
// action 3
},[fifthValue])
I looked into isMounted = useRef(false) example, but it works only if you have just 1 extra useEffect.