1.0.5 • Published 5 years ago

useeffectlogger v1.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
5 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

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago