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

Type 'TranslateValue' is not assignable to type 'ReactNode' #1012

Closed
andrewdoro opened this issue Mar 23, 2023 · 5 comments
Closed

Type 'TranslateValue' is not assignable to type 'ReactNode' #1012

andrewdoro opened this issue Mar 23, 2023 · 5 comments

Comments

@andrewdoro
Copy link

What version of this package are you using?
2.0.3
What operating system, Node.js, and npm version?
Node 16, pnpm
What happened?

After #1011 TS complains when I pass the t function as children
MicrosoftTeams-image (1)

You can fix the error by putting string as a generic, but I don't think that this should be a desired behavirour.

{t<string>('translate.key')}

@jackylo-hc
Copy link

yes I think so, would there a fix soon?

@aralroca
Copy link
Owner

Probably this bug is introduced by this PR #931 CC: @SimplyComplexable

@IRediTOTO
Copy link

image
Same here

@SimplyComplexable
Copy link
Contributor

I'll take a look at this right now.

@aralroca
Copy link
Owner

Thanks @SimplyComplexable ! I released 2.0.4 with your change

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

No branches or pull requests

5 participants