2.1.1 • Published 3 days ago
@ezez/hooks v2.1.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
-useEffect
that gives you previous values - ⏳
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 - 📅
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.1.1-beta.1
3 days ago
2.1.1
3 days ago
2.1.0
2 months ago
2.0.0
4 months ago
1.2.0
9 months ago
1.1.1
10 months ago
1.1.0
10 months ago
1.2.2
8 months ago
1.1.3
10 months ago
1.2.1
9 months ago
1.1.2
10 months ago
1.0.0
11 months ago
0.2.0
11 months ago
0.1.0
11 months ago
0.0.3
11 months ago
0.0.2
11 months ago
0.0.1
11 months ago