Skip to content

Feature: useBackgroundQuery hook #8694

Closed
@hwillson

Description

This is a placeholder issue for tracking purposes. Details in #8783.

this new useBackgroundQuery hook allows a component to fetch data in a way that's managed by the React component lifecycle, without automatically subscribing to every future change in that data, allowing child components to update in place without requiring the parent component to rerender all its children.

in other words: useBackgroundQuery executes as soon as the component mounts and can be used as a render optimization so you can ensure your component doesn't oversubscribe to data changing in the cache that it doesn't care about which can help you avoid some rerenders. The prime use case for this is lists. You might not want a parent component to rerender every time data from a single item in the list is updated.

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions