Skip to content

"UnnamedContext" given as reason for rerender, but doesn't seem right #330

@agos

Description

@agos

I'm trying to pinpoint the reason for some unnecessary re renders with the "What's changed" feature of React Scan, but I've got to a point where it indicates a change in "UnnamedContext" as the reason ("Reference changed but objects are the same"), but I'm pretty sure that Context (which is not really unnamed) is not changing.

First it was the Query Param Provider from use-query-params, so I tried removing that. Then it told me it was a Context of mine to expose some methods which was already under useMemo, so I removed that too. Now it's pointing to what seems to be TanStack Query's Error Reset Boundary.

I believe React Scan is wrong here, and it's probably something to react-hook-form, but I don't know how to debug it further. I'm willing to try out stuff to help understand what's happening, but unfortunately I can't share my project

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