Presenting the useUpdatingRef hook from my React library "LocalBoast". It's a simple little time saver that streamlines a pattern that I commonly use when building complex hooks and components. And you shouldn't use it.
Here's where you can find how to use it!
All my links in one place: linktr.ee/LocalBoast
useUpdatingRef Hook:
* Docs/Demo: localboast.com/docs/hooks/use...
* Source Code: github.com/ConorKelleher/Loca...
React docs on updating a ref: legacy.reactjs.org/docs/hooks...
Source code for demos shown in this video:
* Dark mode toggle:
* Website Code: github.com/ConorKelleher/loca...
* Library Hook: github.com/ConorKelleher/Loca...
Follow the project:
* Website: localboast.com
* GitHub: localboast.com/github
* Discord: localboast.com/discord
* Twitch: localboast.com/twitch
* KZitem Live: localboast.com/youtube
Support this project at the following links:
* Patreon: localboast.com/patreon
* Tip my Stream: localboast.com/tip
* Buy Me a Coffee: localboast.com/kofi
Негізгі бет Ғылым және технология Why You Shouldn't useUpdatingRef - LocalBoast
Пікірлер: 4