Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: debugChangedDependencies #19

Open
adrianhelvik opened this issue Sep 4, 2020 · 2 comments
Open

Feature request: debugChangedDependencies #19

adrianhelvik opened this issue Sep 4, 2020 · 2 comments

Comments

@adrianhelvik
Copy link

adrianhelvik commented Sep 4, 2020

I've been using hooks.macro daily for quite some time now and love it. There is however one pain point I'm struggling a bit with. When effects get hairy it can be difficult to pinpoint what caused the effect to be re-evaluated.

This would be a good solution for this problem. What do you think?

import { logChangedDependencies } from 'hooks.macro'

useAutoEffect(() => {
  logChangedDependencies()
  // way too much code...
})

could log out this message:

[hooks.macro] Changed dependencies: someVar, someOtherVar
@adrianhelvik
Copy link
Author

I can try to make another pull request next week if you'd like. My macro chops have improved since last time. 🙂 Do you have any inputs on the API or functionality?

@tom-sherman
Copy link

This is a duplicate of #2 by the way 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants