You probably can do something like this, I'm not sure if that's the best way to do
useEffect(() => {
setState1;
setState2
}, [])
useEffect(() => {
// you will need some logic here to prevent inital run
// like say if state1 and state2 is at inital state, don't set state3
setState3;
}, [state1, state2])
useEffect(() => {
// same idea, you will need logic from state3 to prevent inital run
func1
}, [state3])
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…