Following this YT video: https://www.youtube.com/watch?v=B-Xb_8n5wRg the usePrevious hook probably should not use `useRef` but instead something closer to that implementation: https://github.com/uidotdev/usehooks/blob/90fbbb4cc085e74e50c36a62a5759a40c62bb98e/index.js#L1017-L1027 Other libraries discuss this too as you can see here: https://github.com/streamich/react-use/issues/2605
Following this YT video: https://www.youtube.com/watch?v=B-Xb_8n5wRg the usePrevious hook probably should not use
useRefbut instead something closer to that implementation: https://github.com/uidotdev/usehooks/blob/90fbbb4cc085e74e50c36a62a5759a40c62bb98e/index.js#L1017-L1027Other libraries discuss this too as you can see here: streamich/react-use#2605