Collection of React Hooks
npm install ts-useyarn add ts-use
useAnimationEvents — use with animations, it tracks and start and exit animation so component can unmount after exit animation has ended
useLocalStorage — hook for managing local storage. Safe with SSR rendering.
useMutationObserver — Use mutation Observer with this hook in react. Safe with SSR rendering.
usePromiseMap — Resolves array of promises within react in a non blocking way.
ReducerProvider — Provider to wrap outer components, takes reducer and initial state.
withReducerProvider — HOC for ReducerProvider Provider to top component.
useReducerStore — returns state, selector and functions for for updating the state from context
useReducerSelector — takes selector and returns value
StateProvider, withStateProvider, useStateStore, useStateSelector
useReactiveState — reactive state that updates with change in initial state
useMount — hook returns state after first mount, takes optional callback to run, it can be resolved with promise
useFetch — hook for using fetch in React, work on SSR also, as it checks to use node or window fetch, suppoers optional queryBuilder
useYoutube — hook to add youtube player logic to component based on Youtube Player library.
withHooksHOC — Add hooks data to class component.
useAsyncStorage — hook for managing storage within react native.