2.3.1 • Published 8 months ago
@ezez/hooks v2.3.1
@ezez/hooks
React hooks like no other! ⚡
Use alongside other great libraries, there are no plans to reproduce all "common" hooks. If a hook is there, it's either unique, rare, super optimized or just needed for other hooks.
Features:
- 💪
useConditionalHooks- break the rules (safely) — call hooks conditionally, use a dynamic list of hooks - 🪄
useEffect2-useEffectthat gives you previous values and allows dynamic list of deps - ⏳
useBusy- keep track of your async operations - 📨
useCrossTabs- hook for cross-tab communication - 📨
useCrossTabsMessage- easily listen to messages from other tabs - 2️⃣
useDetectMultiTabs- detect if there are multiple tabs of your app open - 🔄
useForceUpdate- force render on demand - 🌐
useGeolocation- keep track of user's geolocation (super optimized) - 🌐
useSimpleGeolocation- keep track of user's geolocation (simplified) - ☝️
useInputDevice- keep track of a currently active input device - 🥇
useIsFirstRender- keep track of first render - 💾
useMemoizedFn- improve performance by memoizing functions - 🎭
useProxyRef- wraps your ref with a Proxy for full control - 🎭
useForwardedProxyRef- wraps forwarded ref with a Proxy for full control - 📅
useToday- keep track of day changes - 🔄
useUpdateEvery- force render every interval set
Batteries included:
- 🛠 First class TypeScript support - 100% type safe and intellisense friendly
- 🌎 Universal - exposes both ESM modules and CommonJS
Usage
Full documentation is available here: documentation.
Promotion
- How to call hooks conditionally - the only solution that takes care of the pitfalls
- React Hook is Called Conditionally SOLVED
- useEffect previous value
- useEffect list of changes
License
MIT
2.3.0
12 months ago
2.3.1
8 months ago
2.2.0
2 years ago
2.1.1-beta.1
2 years ago
2.1.1
2 years ago
2.1.0
2 years ago
2.0.0
2 years ago
1.2.0
2 years ago
1.1.1
3 years ago
1.1.0
3 years ago
1.2.2
2 years ago
1.1.3
2 years ago
1.2.1
2 years ago
1.1.2
3 years ago
1.0.0
3 years ago
0.2.0
3 years ago
0.1.0
3 years ago
0.0.3
3 years ago
0.0.2
3 years ago
0.0.1
3 years ago