Releases: roderickhsiao/react-aspect-ratio
Releases · roderickhsiao/react-aspect-ratio
Remove npm requirement
We don't really need npm requirement for this package.
Remove it from package requirement.
Remove unnecessary state
- Remove unused React state
We are not using the state at all, the state is exactly the same as props.
Will be able remove the dependency ofreact-lifecycles-compat
. - Start to support new version of React
We havecomponentDidUpdate
to write css property as React doesn't support it until15.6
.
To prevent breaking changes, I just simply made it a named export, so if you are using a new version of React, you could doimport { AspectRatio } from 'react-aspect-ratio';
which is much simpler - Remove extends from
PureComponent
The component takeschildren
props, which will be different on each render already, extending from PureComponent doesn't have much performance benefit in this case.
Defensive against CSS minification
Fix regression issue around nextProps
Release 1.0.25
- Bump
react-lifecycles-compat
for some browser fixes
https://github.com/reactjs/react-lifecycles-compat/blob/master/CHANGELOG.md
- publish es module
Release 1.0.23
Support React 16.3, use getDerivedStateFromProps