You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
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.