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

Async Variables #16

Open
jeanfortheweb opened this issue Jul 22, 2023 · 3 comments
Open

Async Variables #16

jeanfortheweb opened this issue Jul 22, 2023 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@jeanfortheweb
Copy link

Hello guys,

one of the latest jotai updates made all eventually async operations inside of atoms also async. Therefore, my variables for my query became async too. Any plans to support this? As far as i can see, at the moment of writing, my variables atom can only be sync.

Thanks!

@dai-shi
Copy link
Member

dai-shi commented Jul 23, 2023

In jotai-tanstack-query, we had a long discussion in jotaijs/jotai-tanstack-query#21 and came up with jotaijs/jotai-tanstack-query#30.
I think we should follow the same approach in jotai-urql.

@jeanfortheweb
Copy link
Author

Same here again, thanks for the fast reply! unwrap seems to work just fine for me here, i also use getPause to see if i was able to unwrap a value.

@QWu4xYV
Copy link

QWu4xYV commented Jan 10, 2024

I was also able to use unwrap+getPause to resolve this for now, but some kind of built-in solution would be slightly more elegant. Can we re-open this? I don't have bandwidth to work on it right now, but maybe in the future

@dai-shi dai-shi reopened this Jan 11, 2024
@dai-shi dai-shi added enhancement New feature or request help wanted Extra attention is needed labels Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants