Invalid hook error when attempting to access previous prop value

前端 未结 0 1185
一整个雨季
一整个雨季 2021-01-12 08:44

I have the following code. I would like my log to fire if the value changes.

const usePrevious = (value) => {
  const ref = useRef();
  useEffect(() =>          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题