Skip to content

Feature Request: Ability to filter consumers in context #20014

@ghost

Description

Good Afternoon,

I would like to suggest this:

When we use contexts with provider/consumer, this is a good feature but in some scenarios you just want to trigger the consumer in specific conditions

This ticket is about to request a feature where we can have the ability to define filters in our consumer, and based on these filters the consumer will be triggered or not when the provider changes the value

Why ?

  • Performance boost (because this only will re-render the consumer based on the filters)
  • Usability (we can design better apps and decrease the unnecesary re-renders)

Example

i have a context to manage elements, but i just want to re-render based on the ID

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: UnconfirmedA potential issue that we haven't yet confirmed as a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions