State Management · Middle · Question 36 of 75

How do you skip an RTK Query request until an argument is available?

Explanation

useGetUserQuery(id ?? skipToken) keeps the hook call unconditional while preventing the request. It's the counterpart of enabled: false in TanStack Query.

Further reading

Problem with a question

State Management · Middle · question 36

Test yourself

Take the State Management · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz