如何控制 useEffect 中的 componentDidMount 是否与另一个依赖项?

时间:2021-05-20 13:20:02

标签: javascript reactjs react-hooks

我正在使用带有两个依赖项的 useEffect

useEffect(() => {
   if(this is not the first time useEffect is called which means calls after componentDidMount){
     //my operations
   }
}, [props.inputs, props.inputLabels]);

有没有办法控制这个??

0 个答案:

没有答案
相关问题