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

(react) - leverage the new use-sync-external-store package #2164

Merged
merged 22 commits into from
Jan 30, 2022

Conversation

JoviDeCroock
Copy link
Collaborator

@JoviDeCroock JoviDeCroock commented Dec 25, 2021

Summary

Leverage the new use-sync-external-store for useQuery to make the implementation more in line with React. Our current implementation works already with React Suspense, ... but having an implementation that coexists with React will be better for future changes.

Todos:

  • typing issues
  • prepassing currently doesn't work due to us setting the initial source too late

Sandbox demo

Set of changes

  • use synx-external-store for useQuery and useSubscription

@changeset-bot
Copy link

changeset-bot bot commented Dec 25, 2021

🦋 Changeset detected

Latest commit: 092abb6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
urql Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@JoviDeCroock JoviDeCroock marked this pull request as draft December 25, 2021 09:27
@JoviDeCroock JoviDeCroock marked this pull request as ready for review December 27, 2021 16:31
.changeset/wicked-terms-sneeze.md Outdated Show resolved Hide resolved
packages/react-urql/package.json Outdated Show resolved Hide resolved
packages/react-urql/src/hooks/useQuery.ts Show resolved Hide resolved
Copy link
Member

@kitten kitten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the only remaining task is that we may have to pair and look at useSubscription to finish this off 🙌

@JoviDeCroock JoviDeCroock changed the title (react) - leverage the new use-sync-external-store package (react) - leverage the new use-sync-external-store package Jan 10, 2022
@kitten kitten mentioned this pull request Jan 28, 2022
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.

None yet

2 participants