Course lesson

Use reactive variables to hold local client state in Apollo's cache

We're going to complete our note selection example by adding reactive variables to the mix. These can be created via Apollo's "makeVar()" utility. Same as normal variables, they can be instantiated, read, and updated. The difference is that if we return them...

Duration
4 min
Access
Pro
Transcript
Available

We're going to complete our note selection example by adding reactive variables to the mix. These can be created via Apollo's "makeVar()" utility. Same as normal variables, they can be instantiated, read, and updated. The difference is that if we return them from "read" field policies, whenever they get updated, they'll signal to Apollo that that particular field has changed, and it should re-render the components.