DEV Community

Discussion on: Adding Ionic React to an existing React project

Collapse
 
rockinrone profile image
Ronny Ewanek

While attempting to do this, I keep getting the following TS error from imported ionic components such as IonApp, IonContent, and IonButton, but not from IonModal:

Property 'translate' is missing in type '{ children: Element[]; }' but required in type 'Pick

¯_(ツ)_/¯

I've imported the all the CSS .

Collapse
 
elylucas profile image
Ely Lucas

try updating the @types/react and @types/react-dom to the latest and see if that helps.

Collapse
 
rockinrone profile image
Ronny Ewanek

No luck.

This is an existing React app built with TS. Please let me know if I can provide more info to be helpful!

Thread Thread
 
elylucas profile image
Ely Lucas

hmm, could you get me the versions of the follow:

@ionic/react
react
react-dom
@types/react
@types/react-dom?

Thanks for helping troubleshoot!

Thread Thread
 
rockinrone profile image
Ronny Ewanek • Edited

"@ionic/react": "^5.0.5",
"@ionic/react-router": "^5.0.5",
"react": "^16.9.0",
"react-dom": "^16.10.2",
"@types/react": "^16.9.2",
"@types/react-dom": "^16.9.0",

github.com/ionic-team/ionic/issues...