Skip to content

Commit

Permalink
Update mutation.md code explanation (#62)
Browse files Browse the repository at this point in the history
Make the explanation of `mutate` code example follow the same order as the code above it, it could be confusing that the order of events differs compared to the code.
  • Loading branch information
HermanNygaard authored Dec 21, 2020
1 parent 6ffd5bd commit a63b675
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pages/docs/mutation.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function Profile () {
}
```

Clicking the button in the example above will send a POST request to modify the remote data, locally update the client data and
Clicking the button in the example above will locally update the client data, send a POST request to modify the remote data and
try to fetch the latest one (revalidate).

But many POST APIs will just return the updated data directly, so we don’t need to revalidate again.
Expand Down

1 comment on commit a63b675

@vercel
Copy link

@vercel vercel bot commented on a63b675 Dec 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.