Skip to content

Documentation mistake or incomprehension on my side #262

@bbenezech

Description

@bbenezech

I don't get the so we don’t need to revalidate again part from the documentation.
The second mutate does trigger a revalidation since we don't pass false.

From the documentation:

But many POST APIs will just return the updated data directly, so we don’t need to revalidate again.
Here’s an example showing the “local mutate - request - update” usage:

mutate('/api/user', newUser, false)      // use `false` to mutate without revalidation
mutate('/api/user', updateUser(newUser)) // `updateUser` is a Promise of the request,
                                         // which returns the updated document

I

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