Skip to content

Commit

Permalink
Update commit-mutation.md (#4346)
Browse files Browse the repository at this point in the history
Summary:
This page describes how to use `commitMutation` and includes a code snippet. The snippet contains a typo. This PR fixes the typo by having the snippet import `commitMutation` instead of `useMutation`.

Pull Request resolved: #4346

Reviewed By: tyao1

Differential Revision:
D46782486

Privacy Context Container: L1125407

Pulled By: captbaritone

fbshipit-source-id: c0de54b49f4fc1603e608306ea3b7cbabbb551ef
  • Loading branch information
JoeDailey authored and facebook-github-bot committed Jun 16, 2023
1 parent 9cdf1fa commit 0bf353a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ See also the [`useMutation`](../use-mutation/) API and [Guide to Updating Data](
import type {FeedbackLikeMutation} from 'FeedbackLikeMutation.graphql';
const React = require('React');

const {graphql, useMutation} = require('react-relay');
const {graphql, commitMutation} = require('react-relay');

function likeFeedback(environment: IEnvironment): Disposable {
return commitMutation<FeedbackLikeMutation>(environment, {
Expand Down

0 comments on commit 0bf353a

Please sign in to comment.