RTK Query Endpoint Selectors with Arguments

Sometimes the obvious isn’t. The Redux team helped me find the answer.

Amy Blankenship
CodeX
Published in
5 min readAug 18, 2022

--

Photo of a row of five doors in a wall that has brown patterned wallpaper. Four of the doors are white, but the second from the left is bright yellow. There’s a hardwood floor in the foreground.
Image by Arek Socha from Pixabay

I’ve said before that I think that RTK Query helps a lot with the problems created by React hooks, primarily by doing so much for you that you don’t need to pass small pieces of state back and forth in useMemo, useEffect, and useState. So I’ve been diving into it fairly…

--

--

Amy Blankenship
CodeX
Writer for

Full Stack developer at fintech company. I mainly write about React, Javascript, Typescript, and testing.