Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

remove invalidate from Product and Composition #192

Open
fes300 opened this issue Jul 1, 2019 · 0 comments
Open

remove invalidate from Product and Composition #192

fes300 opened this issue Jul 1, 2019 · 0 comments
Labels
FE maint proposal issues describing early stage proposals that needs to be further discussed before implementation

Comments

@fes300
Copy link
Contributor

fes300 commented Jul 1, 2019

when a Product query is invalidated all the sub-queries that are part of it get invalidated too (ex const prod = product({ user, preferences }).invalidate() invalidates prod but also user and preferences). This makes it easy to mistakenly invalidate bigger chunks of data than actually needed and hides important details when invalidating (you only explicitly mention prod in the invalidation).

The same arguments applies to Composition as const comp = compose( user, preferences).invalidate() invalidates comp and also user and preferences.

The proposal is to leave invalidate only on CachedQuery and progressively mark it "deprecated" and then remove it from Product and Composition

@fes300 fes300 added the proposal issues describing early stage proposals that needs to be further discussed before implementation label Jul 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FE maint proposal issues describing early stage proposals that needs to be further discussed before implementation
Projects
None yet
Development

No branches or pull requests

2 participants