Skip to content

Approach when not using result in the useMutation tuple? #1212

Answered by kitten
GollyJer asked this question in Q&A
Discussion options

You must be logged in to vote

Destructuring an array doesn't require you to choose a name, so you can use: const [, update] = useMutation(...); for instance.

It's also possible to set up an exception for ESLint and TypeScript to ignore variables that start with an underscore, e.g. const [_result, update] = useMutation(...);

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@GollyJer
Comment options

Answer selected by GollyJer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants