1.0.6 • Published 2 years ago

react-more-hooks v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

React More Hooks

React More Hooks is a library for help you in react's projects.

Installation

npm install react-more-hooks

Or, you can use Yarn

yarn add react-more-hooks

List of hooks

NameArgumentsReturnsDescription
useUnmountedfunc: React.EffectCallbackvoidRun the callback when the component is unmounted
useDidMountEffectSame then useEffectvoidRun the callback only if a prop change. Not run in first render
usePeristedStatekey:stringSame then useStateA usestate where the initial value comes from local storage
useStateCallbackinitialState: any, callback: FunctionSame then useStateA usestate where a callback is call when state change
useIsMountednone() => booleanCheck if component is mount
useForceUpdatenonevoidForce a rerender
useScreenSizenone{width: number, height:number }Get screen size

List of contexts

NameDescription
RemountRemount the children

License

MIT

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

2.0.0

2 years ago

0.0.1

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

0.0.2

3 years ago

1.0.0

3 years ago