1.0.5 • Published 3 years ago

useeffectlogger v1.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

useEffectLogger

Link to NPM

This is a custom React hook that is a drop in replacement for the useEffect hook. It will log the index of the variable that triggered the hook, the before and after value of the variable in a table.

npm i useeffectlogger

import useEffectLogger from 'useEffectLogger'
  //change useEffect to useEffectLogger
  
  // useEffect(()=>{
  // },[user,password])
  
  useEffectLogger(()=>{
  },[user,password])

This will be logged in the console when the user variable has changed in the above example.

(index)beforeafter
0"usernam""username"
1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago