Skip to content

Conversation

@lsadam0
Copy link

@lsadam0 lsadam0 commented Mar 30, 2018

Hello qiaolb,

This PR:

  • Removes string ref usage and introduces compatibility with React 16.3
  • Moves method binding from the render body into the constructor, this helps to avoid unnecessary re-renders
  • Only computes container style when the height or width props have changed. This also helps to avoid unnecessary rerenders
  • When the height and width props have changed, the recalculation of container style is handled by react 16.3's new getDerivedStateFromProps method. This replaces componentWillReceiveProps.

Thanks for maintaining this library!

@mylesthedev
Copy link

@qiaolb any chance you can merge this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants