fluent.js
fluent.js copied to clipboard
hoist static functions in withLocalization
This hoists static functions in components decorated using withLocalization as per https://reactjs.org/docs/higher-order-components.html
How does this relate/interact to/with the work @Gregoor started in #406?
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