Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(query): queryClientAtom for initialValues #547

Merged
merged 1 commit into from
Jun 23, 2021
Merged

Conversation

dai-shi
Copy link
Member

@dai-shi dai-shi commented Jun 23, 2021

With #516, setting initialValue in Provider for derived atoms is not recommended.
This PR provides a primitive atom for queryClient. This allows to set the atom in useEffect too.

@dai-shi dai-shi requested a review from aulneau June 23, 2021 08:42
@vercel
Copy link

vercel bot commented Jun 23, 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/pmndrs/jotai/8RcTRi1CcA438LEsEnGfNLC2M1fJ
✅ Preview: https://jotai-git-fix-query-client-pmndrs.vercel.app

@codesandbox-ci
Copy link

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 6c57bb8:

Sandbox Source
React Configuration
React Typescript Configuration

@aulneau
Copy link
Collaborator

aulneau commented Jun 23, 2021

Can you provide examples of how to use this and why it's better?

@aulneau aulneau closed this Jun 23, 2021
@aulneau aulneau reopened this Jun 23, 2021
@dai-shi
Copy link
Member Author

dai-shi commented Jun 23, 2021

Well, the usage is not changed and not documented.
This fixes for something that used work before #516.

@dai-shi
Copy link
Member Author

dai-shi commented Jun 23, 2021

I know there are doc issues (help wanted), but let me merge.

@dai-shi dai-shi merged commit 444c6ab into master Jun 23, 2021
@dai-shi dai-shi deleted the fix-query-client branch June 23, 2021 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants