Fork me on GitHub

Yes, data item has to have an ident because that is how load-field generates a query that the server can understand


the Ident identifies the database entity being queried


So, the data item has comments. The comments are what you want to load (with respect to a data item). The data item has an ident which is used by load-filed to generate query. Not sure what you mean by the rest of it.


Sorry my explanation is lacking, I'm wondering if load-collection is what I should be using.


I want to load a collection of DataItems and pass the whole collection to a table component (takes in a vector and renders a table).


@tony.kay: do you have a code snippet of how to use load-collection anywhere I look at?


I looked at it's spec but still couldn't quite figure it out.


specifically how to use it with lazily-loaded


@currentoor: Look at the latest version of the tutorial. There is a devcard where you can see the app state changing. lazily-loaded isn’t intended for load-data (old name deprecated). The load-data call is typically used with a query to get top-level data and a post mutation get create a resulting UI view. There is a global marker for loading that you can use in “link” queries in order to display a general loading marker.


So, when using load-data you’re typically putting stuff into the app state that isn’t directly visible to UI queries yet.


I’ll have my talk from PDX up soon, and that may help clarify. Basically, the overall story for generalized data loading is for you to load tables in with load-data and do a post-mutation (which you can trigger from the load) to turn that into UI tree structure for the UI.


well, normalized, not tree….but that’s the general idea. The UI queries regularly do NOT match what you want to say to the server.


Awesome, I’ll read through it now and thanks for the help.