A simple, declarative, and composable way to fetch data for React components
OTHER License
Bot releases are visible (Hide)
Full Changelog: https://github.com/heroku/react-refetch/compare/v4.0.1-0...v5.0.0-0
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.
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.
New Feature:
Optimization:
Breaking Change:
value
previously was a function
, it will be evaluated now if comparison
is different. If you need to have the function itself, wrap value
in another function
.value
must also declare comparison
.New Feature:
Breaking Change:
value
previously was a function
, it will be evaluated now if comparison
is different. If you need to have the function itself, wrap value
in another function
.