Skip to content

Now with innerRef

Compare
Choose a tag to compare
@javivelasco javivelasco released this 08 Feb 21:11
· 15 commits to master since this release

This major release includes an important breaking change referenced in #46:

Since assigning string refs is going to be deprecated sooner or later, we should provide refs in as callbacks. Also, accessing instances using the imperative method getWrappedInstance goes against React best practices.

For this from now on we are removing the option withRef and instead you can pass an innerRef prop to the decorated component that will pass down a ref to the decorated component. This makes the API way easier.

Since it's a breaking change, it will be released as a major version.

Enjoy!