A simple, declarative, and composable way to fetch data for React components
TypeScript improvements:
PromiseState
for better compile-time checks https://github.com/heroku/react-refetch/pull/241
OuterProps
& InnerProps
declarations to separate props passed in from one injected by fetches https://github.com/heroku/react-refetch/pull/242
Breaking change for TypeScript users only
To support newer versions of React, this removes the use of deprecated React lifecycle hooks componentWillMount
and componentWillReceiveProps
, deprecated React Context API, and impure functions.
This is a breaking change from the 2.0 releases. To migrate, remove the use of the second context
parameter and the pure
option on any connect()
functions. It generally should not impact applications, but be aware that fetches now happen on componentDidMount
and componentDidUpdate
.
This also updates many dependencies, which resolves security vulnerabilities.
Upgrades to React 16
Removes Webpack
Upgrades to Babel 7
To support newer versions of React, this removes use of deprecated React lifecycle hooks componentWillMount
and componentWillReceiveProps
, deprecated React Context API, and impure functions.
This is a breaking change from the 2.0 releases. To migrate, remove use of the second context
parameter and pure
option. It generally should not impact applications, but be aware that fetches now happen on componentDidMount
and componentDidUpdate
.
Code Change: https://github.com/heroku/react-refetch/pull/233
Additional doc changes are still pending.