Skip to content
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

Avoid using displayName as function name since it does not have to be a valid identifier. #59

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

leidegre
Copy link

A very simple solution to the issue discussed in this pull request #58

@wkwiatek wkwiatek changed the base branch from next to master March 6, 2017 09:04
return instantiate(() => CurrentComponent, this, arguments);
};
}
ProxyComponent = function DynamicProxyComponent() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add some tests to show what problem it solves?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's useful for HOCs to wrap the displayName of the base component, for example HigherOrderComponent(BaseComponent). This is not a valid function name however, which causes unnecessary errors to be thrown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants