TIP
Core Functions
Animation
useInterval
— reactive counter increases on every intervaluseIntervalFn
— wrapper forsetInterval
with controlsuseRafFn
— call function on everyrequestAnimationFrame
useTimeout
— update value after a given time with controlsuseTimeoutFn
— wrapper forsetTimeout
with controls
Browser
useEventListener
— use EventListener with easeuseMediaQuery
— reactive Media QueryusePreferredDark
— reactive dark theme preferenceuseTitle
— reactive document title
Component
tryOnDestroy
— safeonDestroy
tryOnMount
— safeonMount
Sensors
onClickOutside
— list for clicks outside of an elementuseMutationObserver
— watch for changes being made to the DOM tree
State
useLocalStorage
— reactive LocalStorageuseSessionStorage
— reactive SessionStorageuseStorage
— reactive LocalStorage/SessionStorage
Store
readable
— auto unsubscribe on destory forreadable
writable
— auto unsubscribe on destory forwritable
Utilities
useAsyncState
— reactive async state
Watch
whenever
— shorthand for watching value to be truthy