When React came out, the core ideas were crystalline, and I was able to see the advantages in 5 minutes and to actually start doing something in 15. I would be happy to share the excitement for Relay... anyone care to explain? :-)
When React came out, the core ideas were crystalline, and I was able to see the advantages in 5 minutes and to actually start doing something in 15. I would be happy to share the excitement for Relay... anyone care to explain? :-)
Here are some examples of things I do not understand.
The article below the video states that "By co-locating the queries with the view code, the developer can reason about what a component is doing by looking at it in isolation" but nowhere in the tutorial treasure hunt application I see this in action. There is a single React component called App, and I fail to see where it declares its data dependencies.
Moreover, according to the article, "Each component specifies its own data dependencies declaratively", but it seems that a core concept is that of mutation, which does not sound very declarative (although I am not sure I understand what that is exactly). The code for the mutation seems to access the this.props (which I assume live on the component). This looks like a cyclic dependency between components and mutations. The mutation also access a query over something called CheckHidingSpotForTreasurePayload which seems to be defined only in schema.json, although - if I understand correctly - that json is auto-generated.
All of this leaves me confused, which is why I was asking for a more conceptual explation. In other words: given the aims expressed in the article you linked (declarative data dependencies and so on), what is the reasoning that lead to the actual design of Relay?