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

hoist static functions in withLocalization #430

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

Conversation

blushingpenguin
Copy link
Contributor

This hoists static functions in components decorated using withLocalization as per https://reactjs.org/docs/higher-order-components.html

@Pike
Copy link
Contributor

Pike commented Oct 2, 2019

How does this relate/interact to/with the work @Gregoor started in #406?

@blushingpenguin
Copy link
Contributor Author

How does this relate/interact to/with the work @Gregoor started in #406?

They are tangential -- in that PR withLocalization has been reimplemented using react hooks instead of context -- the behaviour wrt to static functions is the same. The two changes do conflict, but only in a minor way -- AFAICS the only difference needed would be:

return hoistNonReactStatics(WithDisplay, Inner);

in fluent-react/src/with_localization.js

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.

2 participants