Skip to content

Releases: roderickhsiao/react-aspect-ratio

Remove npm requirement

29 Feb 18:17
Compare
Choose a tag to compare

We don't really need npm requirement for this package.
Remove it from package requirement.

#40

Remove unnecessary state

28 Feb 08:11
5149b0d
Compare
Choose a tag to compare

#10

  1. 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 of react-lifecycles-compat.
  2. Start to support new version of React
    We have componentDidUpdate to write css property as React doesn't support it until 15.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 do import { AspectRatio } from 'react-aspect-ratio'; which is much simpler
  3. Remove extends from PureComponent
    The component takes children 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

10 Jan 16:57
03eaf0b
Compare
Choose a tag to compare

Discuss thread 53ec158

CSS minification could remove the parentheses which break the style.
Solution is to always add parentheses on render.

Thanks @huyz

Fix regression issue around nextProps

18 May 21:11
Compare
Choose a tag to compare

Release 1.0.25

24 Apr 04:38
0ae5335
Compare
Choose a tag to compare
  1. Bump react-lifecycles-compat for some browser fixes

https://github.com/reactjs/react-lifecycles-compat/blob/master/CHANGELOG.md

  1. publish es module

Release 1.0.23

04 Apr 04:04
Compare
Choose a tag to compare

Support React 16.3, use getDerivedStateFromProps