Urql: RFC: Make "consumer" components reactive to cache changes

Created on 28 Jun 2018  路  3Comments  路  Source: FormidableLabs/urql

In the next branch we already moved a lot of the caching logic to an exchange. It's basically almost equivalent. If we now introduce a more complete "watching" mechanism, then components can react to changes in the cache, which allows us to move all caching logic to an exchange and completely remove it from components.

This also has the nice side-effect of users being able to introduce 100% new caching logic via a custom cache exchange. This could pave way for a normalized cache a la Apollo, which is opt-in as an exchange.

cc @kenwheeler: Let's discuss the potentials of this and its feasibility pre-0.3?

Most helpful comment

@blorenz really well! This branch (let鈥檚 call it next-next 馃槀) has no caching logic anywhere but the cacheExchange, which makes it possible to write custom caching logic for urql https://github.com/FormidableLabs/urql/pull/98

All 3 comments

Let's chat today about the implications

How'd this go?

@blorenz really well! This branch (let鈥檚 call it next-next 馃槀) has no caching logic anywhere but the cacheExchange, which makes it possible to write custom caching logic for urql https://github.com/FormidableLabs/urql/pull/98

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dotansimha picture dotansimha  路  4Comments

andyrichardson picture andyrichardson  路  4Comments

capaj picture capaj  路  5Comments

alexraginskiy picture alexraginskiy  路  3Comments

BjoernRave picture BjoernRave  路  3Comments