Skip to content

Commit

Permalink
Fix invalid usage of useMemo() in docs (#4281)
Browse files Browse the repository at this point in the history
Summary:
Hello relay!

While I was looking for a guide for Relay subscription, I think I found a kind of typo in guided-tour docs.

Any feedbacks are welcome.

Thanks!

Pull Request resolved: #4281

Reviewed By: voideanvalue

Differential Revision: D45678724

Pulled By: captbaritone

fbshipit-source-id: ccc06d1695bfe1b2c247c76db6bbf13c9439dc19
  • Loading branch information
rapsealk authored and facebook-github-bot committed May 11, 2023
1 parent ae210fe commit 7e42ea1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const {useMemo} = require('React');
function useFeedbackSubscription(
input: FeedbackLikeSubscribeData,
) {
const config = useMemo({
const config = useMemo(() => ({
subscription: graphql`
subscription FeedbackLikeSubscription(
$input: FeedbackLikeSubscribeData!
Expand All @@ -113,7 +113,7 @@ function useFeedbackSubscription(
}
`,
variables: {input},
}, [input])
}), [input]);

return useSubscription(config);
}
Expand Down

0 comments on commit 7e42ea1

Please sign in to comment.