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
Attempting to upgrade react-cookie from 2.1.7 to 2.2.0 or above caused our application using the withCookies HOC to break.
After having spent a couple of days of debugging we've come to the conclusion that the React components HOC:ed with withCookies and other third-party HOCs dropped the reference to the innermost component in the property WrappedComponent after having been hoisted in withCookies. As our application relies on WrappedComponent to contain a reference to the base component through the entire hoisting process, it caused major issues for us.
The 2.2.0 release of react-cookies contains this diff with 2.1.7 in withCookies.js:
Question: From what we can tell, the third parameter to hoistStatics is a blacklist of statics not to hoist. Was this change intentional or an oversight? If it was not intentional I would be happy to submit a PR to fix this issue.
Thank you for maintaining this great library!
The text was updated successfully, but these errors were encountered:
Attempting to upgrade react-cookie from
2.1.7
to2.2.0
or above caused our application using thewithCookies
HOC to break.After having spent a couple of days of debugging we've come to the conclusion that the React components HOC:ed with
withCookies
and other third-party HOCs dropped the reference to the innermost component in the propertyWrappedComponent
after having been hoisted inwithCookies
. As our application relies onWrappedComponent
to contain a reference to the base component through the entire hoisting process, it caused major issues for us.The
2.2.0
release ofreact-cookies
contains this diff with2.1.7
inwithCookies.js
:For our use-case, this was a breaking change.
Example component to reproduce behavior:
Question: From what we can tell, the third parameter to
hoistStatics
is a blacklist of statics not to hoist. Was this change intentional or an oversight? If it was not intentional I would be happy to submit a PR to fix this issue.Thank you for maintaining this great library!
The text was updated successfully, but these errors were encountered: