Skip to content

Feature request: debugChangedDependencies #19

@adrianhelvik

Description

@adrianhelvik

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions