Pass Query Arguments to RTK Query Hooks

Share this video with your friends

Send Tweet

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.