Why can't I return an object in response to the Falcor router?

If I use this example in README for netflix / falcor, this works:

return {path:['greeting'], value: 'Hello World'};

But if I try to change the value to an object:

return {path:['greeting'], value: {hello: 'Hello World'}};

It does not seem to work. I'm probably doing something obviously wrong, but I wanted some clarification.

+4
source share
2 answers

Falcor does not allow a value to be returned as an object or an array due to scalability reasons. This explains it.

. "SELECT" WHERE SQL. , 5 , , 10 000 . , , , , .

, , . JSON Graph.

+3

var $atom = Falcor.Model.atom;

return {path:["items"], value: $atom(data.items)};

0

All Articles