Skip to content

[v3.2 => v3.3 regression] v3.3 breaks concurrent mode #1482

@bbenezech

Description

@bbenezech

When using React.unstable_useDeferredValue to control a value passed down to a component then used as key by useQuery, it causes parent component (the one with the deferred hook) to rerender multiple times for no reasons. It mostly goes "crazy". The behaviour stops when removing the useQuery call or using v3.2.

It's probably because we use a pattern that should trigger an error in React (setting state in render, mutating rev cache, this kind of stuff?) but does not yet because of the unstable/experimental state of React concurrent mode.

The diff is here: v3.2.0...v3.3.0

If we remove tests and doc, diff is quite small (src/core/query.ts, useClient and useBaseQuery mosty).

How can I be of any help ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions