Skip to content

Conversation

@brunohkbx
Copy link
Contributor

Why

This function was being called as createAsyncStoragePersistor in the docs but was exported as asyncStoragePersistor

Screenshot from 2021-06-30 16-20-02

@vercel
Copy link

vercel bot commented Jun 30, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/tannerlinsley/react-query/E112qQPJE58PRU6NxUbZVBqLY6jy
✅ Preview: https://react-query-git-fork-brunohkbx-fix-rename-f27c13-tannerlinsley.vercel.app

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 30, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 4575bba:

Sandbox Source
tannerlinsley/react-query: basic Configuration
tannerlinsley/react-query: basic-typescript Configuration

@Aung-Myint-Thein
Copy link
Contributor

Yes, I found out that just today and also asyncStorageKey storage persistor options is just key in the codes. So, might need to fix the doc or fix the codes. I think changing the doc is easier approach but the overall naming will be a bit off. Any take on this?

@maylinmedina
Copy link

I found another issue. The storage parameter in CreateAsyncStoragePersistorOptions has AsyncStorage type, but the AsyncStorage object imported from @react-native-async-storage/async-storage has AsyncStorageStatic type, so there is an incompatibility when building the persistor by following the documentation:

import AsyncStorage from '@react-native-async-storage/async-storage';
import { createAsyncStoragePersistor } from 'react-query/createAsyncStoragePersistor-experimental';

const asyncStoragePersistor = createAsyncStoragePersistor({
  storage: AsyncStorage,
});

@brunohkbx
Copy link
Contributor Author

Thanks @Aung-Myint-Thein @maylinmedina for pointing it out. I think it should be good now. can you guys take a look again?

@maylinmedina
Copy link

@brunohkbx Looks good to me. Thanks.

@bombillazo
Copy link

I'm eagerly awaiting these changes :D wanna test it out in my build.

@Aung-Myint-Thein
Copy link
Contributor

I'm eagerly awaiting these changes :D wanna test it out in my build.

Oh you can actually test out this in the codes. The discussion here is just for naming consistency :D Please let us know where you have problems and I can help out.

@TkDodo TkDodo merged commit 475eb41 into TanStack:master Jul 16, 2021
@tannerlinsley
Copy link
Member

🎉 This PR is included in version 3.19.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@brunohkbx brunohkbx deleted the fix/rename-asyncStoragePersistor branch July 16, 2021 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants