{"repo":"heroku/react-refetch","free":true,"listed":false,"github":"https://github.com/heroku/react-refetch","clone":"git clone https://github.com/heroku/react-refetch.git","description":"A simple, declarative, and composable way to fetch data for React components","language":"JavaScript","stars":3403,"topics":["react","rest","api","data","fetch"],"license":null,"category":"api-integrations-sdks","readme_excerpt":"React Refetch ========================= A simple, declarative, and composable way to fetch data for React components. Installation Requires React 0.14 or later. This assumes that you’re using npm package manager with a module bundler like Webpack or Browserify to consume CommonJS modules. The following ES6 functions are required: - Object.assign - Promise - fetch - Array.prototype.find Check the compatibility tables ( Object.assign , Promise , fetch , Array.prototype.find ) to make sure all browsers and platforms you need to support have these, and include polyfills as necessary. Introduction See Introducing React Refetch on the Heroku Engineering Blog for background and a quick introduction to this project. Motivation This project was inspired by (and forked from) React Redux. Redux/Flux is a wonderful library/pattern for applications that need to maintain complicated client-side state; however, if your application is mostly fetching and rendering read-only data from a server, it can over-complicate the architecture to fetch data in actions, reduce it into the store, only to select it back out again. The other approach of fetching data inside the component and dumping it in local state is also messy and makes components smarter and more mutable than they need to be. This module allows you to wrap a component in a connect() decorator like react-redux, but instead of mapping state to props, this lets you map props to URLs to props. This lets you keep your components completely","default_branch":null,"files":null,"tree":[],"storefront":"/r/heroku","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/heroku/react-refetch/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}