createAsyncStoragePersister is not a function (it is undefined)
Hey guys,
I am trying to implement the persistent storage on my react-native app, but I get the error:
TypeError: (0 , _queryAsyncStoragePersister.createAsyncStoragePersister) is not a function
.
This is my persister:
const asyncStoragePersister = createAsyncStoragePersister({
storage: AsyncStorage,
key: 'userLoggedIn',
});
My provider:
<PersistQueryClientProvider
client={queryClient}
persistOptions={{ persister: asyncStoragePersister }}>
My Import files:
import AsyncStorage from '@react-native-async-storage/async-storage';
import { PersistQueryClientProvider } from '@tanstack/react-query-persist-client';
import { createAsyncStoragePersister } from '@tanstack/query-async-storage-persister';
Do you have any ideas on what's going on here? @TkDodo 🔮0 Replies