Share your code.
We built the data loading layer so you don't have to.
The main purpose of this component library is to take care of data loading, store generation, and persistence so that you can focus on views instead of data fetching.
// Somewherevar exampleConfig =name: "Parents"idAttribute: "id"basePath: ""endpoint: "checklists"storeType: "shared";// In your render function<Datasource ...exampleConfig><SomeViewComponent></Datasource>
- SomeViewComponent should expect to receive
(object) actions, and any other props passed to Datasource
At Procore we use it in this way
<Datasource ...exampleConfig><Collection><ChecklistCell onSelect=thisonSelect/></Collection></Datasource>
- Collection can be thought of as a
layoutcomponent, its inputs are an
(object) actions, and a
(ReactComponent) cell. It maps over
- This approach allows us to quickly create customizable lists by simply swapping out the layout cell, and the endpoint we're hitting.