3 ms·
This is a sad but expected day. For years i seem to have been the last lonely falcor user who is still excited about this and thinks this is one of the best abs
by jFriedensreich 3y ago
This is a sad but expected day. For years i seem to have been the last lonely falcor user who is still excited about this and thinks this is one of the best abstractions for a key class of state management applications, that are not a great fit to graphQL at all.
- Falcor can be schemaless with optional json schema where it makes sense
- Falcor supports simpler to reason about and implement features that map perfectly to javascript objects so you can do zero boilerplate databinding with ES proxies without writing query and mutation wrappers
- Does not try to be a qyery language but only expose things you need to request the data that needs to be rendered in the UI
I think not even the creators of falcor fully understood how perfect it is if you just add in the last missing piece of fully automating the connection from the falcor model to the place in the UI templates where the data is needed. Most people tried doing this manually in component boilderplate which lead initially to preloading tens of json paths eg
falcor.preload([`todos.done.length`,`todos.done[0..10].name`,
`todos.done[0..10].date`, ...etc.])
and then people developing GraphQl like syntax for these eg. somthing like
load(`
todos { done 0...10 {name, data} } etc.
`)
at which point devs thought they might as well be using graphQL and get more features
The key mistake was that you need to instead think about your UI components ITSELF as the data quueries
eg you can automatically derive all falcor quieries from a component like this without ANY boilerplate, and this is only possible with falcor, as everything else has so many features that it would not be possible to map the UI code to the intended data queries
{#each todos as todo}
<div>{todo.name} ({todo.date})</div>
{/each}
It does not look like netflix will hand over falcor to a community and the codebase needs lots of work especially around tooling and overuse of some patterns like a custom observable implementation but i am still on the fence about building a new minimal derived library or forking