-
Notifications
You must be signed in to change notification settings - Fork 364
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 '{ children: string; }' has no properties in common with type 'IntrinsicAttributes & TransProps' on Trans component #1231
Comments
I'm having the same error in my react project since I upgraded to React 18. The reason seems to be that As far as I understand it, Lingui needs to be updated to declare |
That solved the problem thanks ! I created a patch using patch-package :
I also had the problem with I18nProvider :
|
same problem when use it with typescript and react18. |
Just released 3.13.3 with the according fix. Enjoy! 🥳 |
Describe the bug
Hello!
First, thanks for the awesome lib. I've been using it for a year on a react native project, it's working like a charm !
I am getting the following error in a new react/nextjs project :
using the Trans component from @lingui/macro (not @lingui/react I checked).
I juste installed a fresh nextjs project using
yarn create next-app --typescript
, and than installed lingui following the installation process. Everything works fine, text gets translated, but in the editor there is an error (see screenshot).To Reproduce
Create a new nextjs project using
yarn create next-app --typescript
than installed lingui
package.json looks like :
tsconfig.json :
next.config.js
lingui.config.js
and add a <Trans somewhere :
Expected behavior
No typescript error
Additional context
Add any other context about the problem here.
3.13.2
@babel/core@7.17.9
PS: not sure that it is lingui related, maybe @types/react related ? Can you point me in the right direction ? Thanks a lot !
The text was updated successfully, but these errors were encountered: