Course lesson

Pass Query Arguments to RTK Query Hooks

Our pokemon detail query is hard coded to a single pokemon. We want to be able to click on any pokemon to navigate to that pokemons detail page. Making queries dynamic in RTK Query is as easy as passing the data into the hook destructuring that data in the...

Duration
1 min
Access
Free
Transcript
Retained from source evidence

Our pokemon detail query is hard coded to a single pokemon. We want to be able to click on any pokemon to navigate to that pokemons detail page. Making queries dynamic in RTK Query is as easy as passing the data into the hook destructuring that data in the query function.