Skip to content

Latest commit

 

History

History
43 lines (20 loc) · 986 Bytes

README.md

File metadata and controls

43 lines (20 loc) · 986 Bytes

Rax Hooks

🥳 Contains rax hooks that are used very frequently.

Component Life Cycle

  • useMountedState: get component mount state

  • useMounted: calls a function after the component is mounted

  • useUnmount: calls a function when the component will unmount

Side Effect

  • useOnceEffect: run an effect only once

  • useAsyncEffect: run an async effect

  • useOnceAsyncEffect: run an async effect only once

  • useFetch: makes isomorphic http requests

  • usePromise: use promise in function component

  • useImport: makes dynamic import component

  • useInterval: makes a safe setTimeInterval effect

  • useTimeout: makes a safe setTimeout effect

  • useRouter: configure router in function component

State

  • useCountdown: tracks state of count down

  • useStorage: tracks state of localstorage