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

Make ReactLocalization the value of FluentContext #446

Merged
merged 3 commits into from
Jan 15, 2020

Conversation

stasm
Copy link
Contributor

@stasm stasm commented Jan 14, 2020

The value of FluentContext is now an instance of ReactLocalization which gained the parseMarkup method.

I also exposed FluentContext as part of the public API in case someone prefers to use it via FluentContext.Consumer or the useContext hook. In fact, I think we should declare these methods as preferrable to the withLocalization decorator, which suffers from not hoisting static members of the inner component, if any are present. #430 has a fix for it but perhaps we could live with this shortcoming of withLocalization if other methods are available.

@stasm
Copy link
Contributor Author

stasm commented Jan 14, 2020

@Gregoor Would you mind taking a look at this?

@Gregoor
Copy link
Contributor

Gregoor commented Jan 15, 2020

The changes look good to me 👍

@stasm
Copy link
Contributor Author

stasm commented Jan 15, 2020

Thanks :)

@stasm stasm merged commit c7c39da into projectfluent:master Jan 15, 2020
@stasm stasm deleted the react-context-value branch January 15, 2020 16:28
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