Hooks
useState()hook to store simple datauseEffect()hook to replacecomponentDidMount()componentWillUnmount()andcomponentDidUpdate()to manage lifecyclesuseContext()hook to allow you access global state byContextAPI of reactuseReducer()hook to allow you use Redux-style code to manage state lifecycleuseCallback()hook to return memorized callback, here's a guideuseRef()hook to fold elements and mutable values- react hook utility such as react-use
useThrottle()anduseDebounce()allows you to reduce frequent calls
- SWR: A strategy to first return the data from cache
(stale), then send the fetch request (revalidate), and finally come with the
up-to-date data
- similar library that does this is TanStack Query
Last updated on September 18, 2023