Skip to content

Support optimisticData as a function #1858

@shuding

Description

@shuding

Discussed in #1850

Originally posted by ludovic-montel February 9, 2022
First of all, thanks a lot for this library. I've been using it for almost a year, and more intensively for several months, and I love it!

Il like to create optimistic user interfaces, and the new optimisticData option with its auto-rollback behavior is great!

I'd like to push it a little further: could you optimisticData as a function ? I think it would be consistent with the mutate first argument and with #1817.

This function would take the cached data as parameter, and would allow:

  • using the global mutate function
  • extracting and test a pure function that makes the mutation I want, depending on the current data and the operation that is processed

Again, thanks a lot for your work

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions