Closed phryneas closed 3 years ago
Lenz just put up a commit with hypothetical designs for three different variations on this concept: "context"-based, "callback"-based, and "promise"-based:
Thoughts?
This is on the integration branch right now, closing it here.
We could introduce a
cacheEntryContext
next to the existingrequestContext
(renamed from justcontext
and add two new lifecycle callbacks:cacheEntryAdded
andcacheEntryCleared
. Those two lifecycles would allow supporting stuff like graphql subscriptions or websocket streams.OR we go
useEffect
here and havecacheEntryAdded
just return a cleanup callback. Then we could skip all thecacheEntryContext
nonsense and omitcacheEntryCleared