React Hooks API
A high-quality & reliable React Hooks library.
State Management Hooks
- useBoolean - Manage boolean state with convenient actions
- useToggle - Toggle between two values
- useMap - Manage Map state
- useCounter - Manage counter state
- useSetState - Manage object state like class component setState
- useArray - Manage array state with convenient methods
- useNumber - Manage number state with increment/decrement
- useMethods - Manage state with custom methods
Storage Hooks
- useLocalStorageState - Sync state with localStorage
- useSessionStorageState - Sync state with sessionStorage
- useCookieState - Sync state with cookies
Performance Hooks
- useLatest - Get the latest value without re-rendering
- useMemoizedFn - Memoize function to avoid re-creation
Lifecycle Hooks
- useUnmount - Execute callback on component unmount
Async Hooks
- useCancelableAsyncTaskCallback - Create cancelable async task callback
- useTaskPending - Wrap async task with pending state
- useTaskPendingState - Wrap async task with pending state and store result
Utilities
- createUseStorageState - Create custom storage state hook