-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
useSuspenseQuery
: remove promiseCache
#11363
useSuspenseQuery
: remove promiseCache
#11363
Conversation
|
size-limit report 📦
|
79577b5
to
b8c51af
Compare
we only care about identity, not about contents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change looks good to me. Thanks for digging into this further and making some improvements here. Sometimes I forget that a new empty object is enough to be a unique identifier in a lot of cases, rather than the "original" thing. Thanks!
@@ -92,7 +92,6 @@ export class InternalQueryReference<TData = unknown> { | |||
// Don't save this result as last result to prevent delivery of last result | |||
// when first subscribing | |||
this.result = observable.getCurrentResult(false); | |||
this.key = options.key; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the key
is no longer needed from options
, could you remove this from InternalQueryReferenceOptions
and stop passing it from SuspenseCache
?
Also looking at the other suspense hooks, but putting this here already so @jerelmiller can take a look.
Checklist: