8
Watch
7
Star
1
Fork
0
Issue

🥳 Contains rax hooks that are used very frequently.

raxjs
raxjs
pushedAt 2 months ago

raxjs/rax-hooks

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

ucloud ads