@bambooapp/react-hooks
TypeScript icon, indicating that this package has built-in type declarations

1.0.8 • Public • Published

React Hooks

A easy to use, fully type-safe, react hooks library to easy your day to day react development.

Installation

Use a bundler of your choice to import the library. eg: yarn add @bambooapp/react-hooks

Ref Hooks

  1. useLatest Use the most recent value of the argument, but as a ref.
  2. usePrevious Use the last value of the argument, returns a ref
  3. useMergeRefs Use this hook to merge different refs, legacyRefs or RefCallbacks into one. The reference of the returned value never changes.

Callback Hooks

  1. useSafeCallback Use a safe callback, the reference function never changes, yet always has access to the most recent state. Write your code without worrying about writing a single useCallback.

Detective mode on

  1. useWhatHasUpdated Use a hook to investigate what has changed. It will log to the console if the value of the object changes.

Readme

Keywords

none

Package Sidebar

Install

npm i @bambooapp/react-hooks

Weekly Downloads

37

Version

1.0.8

License

MIT

Unpacked Size

10.4 kB

Total Files

19

Last publish

Collaborators

  • jasim_awan
  • elvisduru
  • thetaung.webbee
  • adilovcode
  • shashank.agarwal