Re:Beyond React 16 by Dan Ambramov – Async Rendering and Rea...
by danabramov on Thursday March 01, 2018 @03:16PM
(#16495792)
It's up to you. I intentionally kept moving parts to the minimum in my demo, but here's the real thing I was using behind the scenes: https://github.com/facebook/react/tree/master/packages/simpl.... So in that sense it's not global, you can create as many as you like and then isolate them (e.g. per subtree).
The `simple-cache-provider` is just a reference implementation though. It's somewhat naïve, e.g. it doesn't have invalidation strategy and just lets you replace the whole cache with a new one if you want to invalidate.
We'll publish more details on lower level API and how to write your own cache in the future.
The `simple-cache-provider` is just a reference implementation though. It's somewhat naïve, e.g. it doesn't have invalidation strategy and just lets you replace the whole cache with a new one if you want to invalidate.
We'll publish more details on lower level API and how to write your own cache in the future.