-
-
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
Add displayName
option to connect()
#395
Conversation
I think I’d rather not add a separate API for this. var c = connect(...)
c.displayName = ... |
I know but it gets really cumbersome if I want to have the original name in it: function addPostTitle(postId) {
return Component => {
var C = connect(state => ({title: state.posts[postId]}))(Component);
C.displayName =`addPostTitle(${getDisplayName(Component)})`;
return C;
};
} Also I need to the implement the |
OK. Let’s rename it to |
Yeah. It's more consistent with other APIs. |
name
option to connect()displayName
option to connect()
PR updated. Also added a simple test case for it. |
Am I the only one that thinks that the
|
Superseded by #416 |
I'm using bunch of custom HOCs with
connect()
likeThis causes React devtools to be polluted with useless
Connect(Connect(Connect(Something)))
style components. This would allow to use more meaningful names.