Giter Site home page Giter Site logo

react-dataloader's Introduction

react-dataloader

We built the data loading layer so you don't have to.

Why

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.

What's included:

  • ObjectLoader
  • Datasource
  • DependentDatasource
  • FilteredDatasource
  • Examples

Usage

// Somewhere
var exampleConfig = {
  name: "Parents",
  idAttribute: "id",
  basePath: "http://localhost:8083/api/",
  endpoint: "checklists",
  storeType: "shared"
};

// In your render function
<Datasource {...exampleConfig}>
  <SomeViewComponent>
</Datasource>
  • SomeViewComponent should expect to receive (array) collection, (object) actions, and any other props passed to Datasource

At Procore we use it in this way

<Datasource {...exampleConfig}>
  <Collection>
    <ChecklistCell onSelect={this.onSelect}/>
  </Collection>
</Datasource>
  • Collection can be thought of as a layout component, its inputs are an (array) collection, (object) actions, and a (ReactComponent) cell. It maps over collection and returns cells.
  • This approach allows us to quickly create customizable lists by simply swapping out the layout cell, and the endpoint we're hitting.

react-dataloader's People

Contributors

mboperator avatar remyyounes avatar gbriones avatar pmkhougaz avatar kespinola avatar andrewlee5889 avatar karismatic-megafauna avatar raijjin avatar

Stargazers

Martin Eboh avatar Sjoerd Bodbijl avatar Vladimir Starkov avatar hello avatar Dmitry Polushkin avatar Danny Phillips avatar Joakim Sælemyr avatar

Watchers

 avatar James Cloos avatar  avatar Jason Gittler avatar  avatar Danny Phillips avatar  avatar

react-dataloader's Issues

Custom store method support

Store extensions must

  • Create corresponding actions
  • Allow for analagous synchronizer actions

Todo

  • Draft options for store extension
  • ???

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.