2 ms·
Fragment queries load exactly what you want, with automatic smart caching etc. out-of-the-box, and give you robust controls when you want to get deeper into cac
by lmeyerov 10y ago
Fragment queries load exactly what you want, with automatic smart caching etc. out-of-the-box, and give you robust controls when you want to get deeper into cache control, API generation, middleware, etc. I suggest taking a closer look.
For the above example, we'd write React+Falcor along the lines of
//vanilla react
const myReactComponent =
props => <h1>`Hello, ${props.name} and ${props.petName}`</h1>;
//falcor live query + binding to react component
const myView = Container(
myReactComponent,
`{users['alice']: {name, pet: {name, age}}}`);
Whenever any individual field in the server model updates, we get the update, and Falcor+React takes care of batching, incremental renders, etc.