om-next

2016-11-07T02:01:11.000325Z

i'm loving om.next -- what is its future?

keatondunsford 2016-11-07T05:51:41.000326Z

Om.After.Next

keatondunsford 2016-11-07T05:51:51.000327Z

Then Om.Beyond.After.Next

keatondunsford 2016-11-07T05:52:23.000332Z

Then Om Next colonizes Mars.

😂 1
keatondunsford 2016-11-07T05:52:24.000333Z

The end.

joseph 2016-11-07T09:20:00.000335Z

Hi, I am developing a project with om.next these days, and getting confused about the query concept, and get some following questions: 1. In what kind of situation should I define the query in read function in parser, I found in the examples, not all query in component is defined in the read function, so what's the principle? 2. how should we pass the data to children components. Organize the data following the structure of components and passing them through each level?

2016-11-07T10:39:03.000336Z

I've never seen a query defined in the read parser, but you can query the read parser from om/IQuery method. You can also query all sorts of objects that are passed to the component if they exist in the parent component but not in the read parser. You can do all sorts of normalization and joins just with how you query. I would always have a read key in the read parser available for every read, or have a default method on read (just get the key from the component state (in env)) and you can save some typing.

joseph 2016-11-07T11:44:51.000337Z

@hlolli Yes, we can get the data passed to the component from its parent component, with its query not defined in the read parser, and I also define almost every query in the read parser, but no idea when it's necessary to define query in read parser, when not

2016-11-07T13:05:38.000338Z

@joseph in my experience (havent read the source code alot), you can somethimes pass data from parent component without needing to query its key, but as soon as you are passing a key to a child component that exists in read and there's any change in the global state, you will loose all the data if its unqueried. I would be careful about data passed down that's unqueried and look after the possibility that you could loose data from a component that way.