Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add back render callback pattern for v10 #708

Closed
rosskevin opened this issue Jan 30, 2019 · 4 comments
Closed

Add back render callback pattern for v10 #708

rosskevin opened this issue Jan 30, 2019 · 4 comments

Comments

@rosskevin
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
/from #703 (comment)

Currently the render callback from v9 was dropped but a the hoc is retained. That's too hard of a break in my opinion for class-based users. I for one am exclusively using it over the hoc, and we have many classes to convert before we can use hooks.

Describe the solution you'd like
I suggest strongly that a render callback needs to be included in v10.

Describe alternatives you've considered
If leaving this as-is I would have two choices:

  • convert my entire class code to functions and hooks (not incremental)
  • convert my entire function code to hooks AND convert all NamespaceConsumer usage to hocs or functions and hooks.
@jamuhl
Copy link
Member

jamuhl commented Jan 30, 2019

TranslationRenderProp ? or do you have an idea for a good naming?

@rosskevin
Copy link
Collaborator Author

I would just use Translation to provide the pattern - consistent in naming to useTranslation and withTranslation.

@jamuhl
Copy link
Member

jamuhl commented Jan 30, 2019

okey

@jamuhl
Copy link
Member

jamuhl commented Jan 30, 2019

Translation render prop landed in react-i18next@10.0.0-alpha.2

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

No branches or pull requests

2 participants