-
Notifications
You must be signed in to change notification settings - Fork 25
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
copies static methods to HOC #19
base: master
Are you sure you want to change the base?
Conversation
Why not just use |
Ummm..yes. Let me research that and modify the Pr. |
Sounds good to me. Let me modify this Pr with that instead. |
That's up to @goatslacker 😄 |
otherwise looks good though? I added a test as well :) |
@@ -47,6 +47,7 @@ | |||
*/ | |||
|
|||
import React from 'react' | |||
import hoistNonReactStatic from 'hoist-non-react-statics' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"statics" probably
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure. was just copying that from the modules repo. update en route.
@taion updated. @goatslacker thoughts? |
I guess for now I can use same technique on the component returned from connect until this is merged in right? Just would be nice to include it inline with the other statics |
@goatslacker @taion should I just close this PR? |
@goatslacker @taion status? |
this copies static methods on the component class sent to connect to stores. this would be valuable for components that are at the top level, and in an SPA you may want to call fetch for server side rendering from a pre-defined method. this makes no assumptions on what the name of that method should be. you may also just want to call the fetch method before rendering, and being able to specify that in the component is nice.