-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why use hoist-non-react-statics
?
#276
Comments
Practical choice.
We didn't do that before and people had too many issues putting stuff like |
facepalm I should have searched. Thanks for the quick reply! |
Fix #596 See for reference: - reduxjs/react-redux#53 - reduxjs/react-redux#276
I'm asking this from a discussion in formatjs/formatjs#196 that got me curious on this decision.
The gist of the discussion in from the
injectIntl
HOC via @ericf:This makes sense to me. While I have used
connect
's hoisted statics for server rendering, I wonder if it's encouraging a bad pattern. Since the result ofconnect
is indeed another function, and static methods aren't normally maintained in higher order functions, should developers usingconnect
be aware of this and instead define statics on the result ofconnect
instead?I personally am not looking for change by removing
hoist-non-react-statics
--simply interested in reasoning about the decision to use it.The text was updated successfully, but these errors were encountered: