Skip to content

Optimize usePrevious #115

Description

@FleetAdmiralJakob

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: streamich/react-use#2605

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions