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

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
Labels

Comments

@rosskevin
Copy link
Collaborator

@rosskevin rosskevin commented Jan 30, 2019

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

This comment has been minimized.

Copy link
Member

@jamuhl jamuhl commented Jan 30, 2019

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

@rosskevin

This comment has been minimized.

Copy link
Collaborator Author

@rosskevin rosskevin commented Jan 30, 2019

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

@jamuhl

This comment has been minimized.

Copy link
Member

@jamuhl jamuhl commented Jan 30, 2019

okey

@jamuhl

This comment has been minimized.

Copy link
Member

@jamuhl jamuhl commented Jan 30, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.