-
Notifications
You must be signed in to change notification settings - Fork 787
Provide shouldInvalidatePreviousData prop #2889
base: master
Are you sure you want to change the base?
Conversation
@jcready: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/ |
to invalidate `previousData` if no `shouldInvalidatePreviousData` prop was provided
Thanks for this PR @jcready! I'm wondering if we're over-complicating things here a bit. What if we just added something like a |
return keys.every(key => hasOwnProperty.call(objB, key) && is(objA[key], objB[key])); | ||
} | ||
|
||
export function shallowEqualSansFirst(objA: any, objB: any) { |
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.
@jcready Can you explain why this is necessary?
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.
I didn't want to re-write all the tests that depend on this functionality and it does seem like first
is typically only used for pagination which means you generally wouldn't want to invalidate the previous data if it changed.
@hwillson
To me that sounds like it would make things more difficult for the consumer since they would then have to keep track of the previous variables themselves. The |
Thanks for the feedback @jcready. Regarding making this the default behavior, I agree, but we're kinda of stuck with things the way they are now (due to backwards compatibility issues). You touched on part of the bigger issue when you mentioned |
@hwillson This is still an issue, and after the 3.1 release, it is not fixed. By the way, you might want to reopen #2202. Also see: #3572 |
is it getting merged? |
Fixes #2202
Checklist: