Relative Content

Tag Archive for reactjsreduxreact-reduxredux-toolkitrtk-query

How to trigger data fetching from an action with RTK Query?

I’m not new to Redux, but I am new to RTK and RTK Query. Back in the old days the way you’d trigger data to refetch whenever a specific action happened (I changed my form state, that means I want to fetch new data based on that form state) was you’d dispatch your action, then you’d have a saga that would be listening for that action and kick off a data fetch, which would have its own sequence of actions.