react-refetch

A simple, declarative, and composable way to fetch data for React components

OTHER License

Downloads
21.3K
Stars
3.4K
Committers
67

Bot releases are hidden (Show)

react-refetch -

Published by ryanbrainard about 7 years ago

react-refetch - v1.0.1-2 (beta)

Published by ryanbrainard over 7 years ago

react-refetch - v1.0.1-1 (beta)

Published by ryanbrainard over 7 years ago

react-refetch - v1.0.1-0 (beta)

Published by ryanbrainard over 7 years ago

react-refetch -

Published by ryanbrainard almost 8 years ago

  • Adds support for any compatible fetch implementation. Auto-detects default fetch including client and server side implementations.
  • Removes whatwg-fetch as a peer dependency.
  • Adds connect.defaults() function to set options and default values for request mappings. Includes type checking of defaults. [docs]
  • Adds ability to set buildRequest, fetch, and handle Response implementations in connect.defaults() or in mapping definitions. [docs]
  • Deprecated options argument in connect. Applications that use withRef as an option (i.e. connect(props, { withRef: true })) should change to using connect.defaults (i.e. connect.defaults({ withRef: true })(props)).
  • Documented required polyfills.
    • Improved type checking
  • Optimize to shallow compare props and context during componentWillReceiveProps and only recalculate mappings and refetch if props and context actually changed.
  • Moved connect-only level options from defaults() to options(). All request attributes can now be supplied in defaults() or individual requests.
  • Fixed PromiseState.resolve to return value as-is if it is already PromiseState
  • Fixes handling of rejected fetches (https://github.com/heroku/react-refetch/pull/107)
  • Only re-render component if props or requests shallowly changed
  • Omit children in willReceiveProps comparison
  • Add pure option allow apps to control always updating on prop changes
  • Allow then and catch to return undefined for side effects
  • Allow refreshing to take a function to change value before request
  • Update development dependencies to React v15
  • Added wrappedInstance to the meta object https://github.com/heroku/react-refetch/pull/139
  • Fixes: Requested keys of a value that is not an object https://github.com/heroku/react-refetch/pull/143
  • Migrates to use files directive in package.json instead of .npmignore. https://github.com/heroku/react-refetch/pull/133
  • Returns a new object from PromiseState.refreshing https://github.com/heroku/react-refetch/pull/150
react-refetch -

Published by ryanbrainard about 8 years ago

react-refetch -

Published by ryanbrainard about 8 years ago

react-refetch -

Published by ryanbrainard over 8 years ago

  • Fix parent equalality
react-refetch -

Published by ryanbrainard over 8 years ago

react-refetch -

Published by ryanbrainard over 8 years ago

  • Only re-render component if props or requests shallowly changed
  • Omit children in willReceiveProps comparison
  • Add pure option allow apps to control always updating on prop changes
  • Allow then and catch to return undefined for side effects
  • Allow refreshing to take a function to change value before request
  • Fix parent/default mapping inheritance. Avoids infinite then and inherits fetch, buildRequest, Request, and handleResponse
  • Update development dependencies to React v15
  • Improved tests
react-refetch -

Published by ryanbrainard over 8 years ago

Thank you to @nfcampos for this contribution!

react-refetch - v1.0.0-beta.3

Published by ryanbrainard over 8 years ago

  • Moved connect-only level options from defaults() to options(). All request attributes can now be supplied in defaults() or individual requests.
  • Fixed optional context parameter to work with connect being used as a function (instead of a decorator)
  • Fixed PromiseState.resolve to return value as-is if it is already PromiseState

Thanks to @nfcampos for his contributions to this release!

react-refetch - v1.0.0-beta.2

Published by ryanbrainard over 8 years ago

  • Optimize to shallow compare props and context during componentWillReceiveProps and only recalculate mappings and refetch if props and context actually changed. This change maybe potentially breaking, but mapPropsToRequestsToProps should have always been a pure function and should not impact apps that abided by that contract. Pull Request: https://github.com/heroku/react-refetch/pull/94

Thank you to @nfcampos for the contribution!

react-refetch - v1.0.0-beta.1

Published by ryanbrainard over 8 years ago

  • Improved type checking
  • fetch, handleResponse, buildRequest and Request can now be set at the mapping level
  • every option can now be set at the individual mapping or defaults level

See https://github.com/heroku/react-refetch/pull/96 for more details.

Thank you to @nfcampos for the contribution!

react-refetch - v1.0.0-beta.0

Published by ryanbrainard over 8 years ago

  • Adds support for any compatible fetch implementation. Auto-detects default fetch including client and server side implementations.
  • Removes whatwg-fetch as a peer dependency.
  • Adds connect.defaults() function to set options and default values for request mappings. Includes type checking of defaults. [docs]
  • Adds ability to set buildRequest, fetch, and handle Response implementations in connect.defaults(). [docs]
  • Deprecated options argument in connect. Applications that use withRef as an option (i.e. connect(props, { withRef: true })) should change to using connect.defaults (i.e. connect.defaults({ withRef: true })(props)).
  • Documented required polyfills.

The features above were delivered in https://github.com/heroku/react-refetch/pull/76 by the amazing @passcod!

react-refetch - v0.8.0

Published by ryanbrainard over 8 years ago

react-refetch - v0.8.0-beta.0

Published by ryanbrainard over 8 years ago

react-refetch - v0.7.1

Published by ryanbrainard over 8 years ago

  • Support identity requests with falsey values
  • Support React 15 RC
react-refetch -

Published by ryanbrainard over 8 years ago

  • Add identity requests
  • Allow any version of whatwg-fetch
  • Add cause field to errors in PromiseState.reason to access raw object that caused the error
  • Fix bug with header comparison
  • Fix body parsing when body is empty.
  • Update dev dependencies
  • Correction of lots of typos in readme
Package Rankings
Top 1.45% on Npmjs.org
Badges
Extracted from project README
build status npm version npm downloads