Re:Render realtime RethinkDB results in React
by zachallaun on Saturday July 04, 2015 @12:00PM
(#9830510)
Could you elaborate on this? This project seems to be moving in the same direction the React team is with Relay and GraphQL – the component describes the query it requires to render itself, and a query/caching layer executes the query automatically.
[ Parent
| on HN ]
Re:Render realtime RethinkDB results in React
by crucialfelix on Saturday July 04, 2015 @02:44PM
(#9831159)
What I described as a Service would be what this query/caching layer is. I would just rather not have it embedded in the Component, making it harder to follow what a Component does. The beauty of them is that they are simple to read and understand. The more mixins you use, the more esoteric it gets and you have to read a bunch of code to understand why the render function magically has these properties to display with.
Another point would be that the service or store could be re-used in more than just react, and it can be tested without having to consider the UI.