Skip to content

RTK Query: refetchOnFocus is not working for me in a ReactNative app #3652

Closed
@jr00n

Description

@jr00n

Hi, reading the docs at https://redux-toolkit.js.org/rtk-query/usage/cache-behavior#re-fetching-on-window-focus-with-refetchonfocus
I expect my queries to be refetched when the app is gaining focus again when running in the background for a while...but nothing happens.

export const apiSlice = createApi({
  baseQuery: baseQueryWithReauth,
  endpoints: () => ({
  ...
  }),
  refetchOnFocus: true,
});

What do I miss?

Metadata

Metadata

Assignees

No one assigned

    Labels

    RTK-QueryReact-NativeIndicates an issue specific to the React Native environmentdocs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions