I have created an app in JS react. To continue my work i have come up with a file in TSX. What should I do ?
Can I import a TSX file and interact with it whithin a JSX file ? Should I transform my whole app to TSX for it to work ?
CodePudding user response:
Yes you can, you just need to include a tsconfig file, though it would be better to stick to one.
CodePudding user response:
Like @Kyano said, yes you can. But it is not the right thing to do (a.k.a it is not a good practise).
You can however :
- translate the tsx into jsx and then import the jsx.
- Rewright the tsx file by your own in pure jsx
- Move your all app into tsx (if you intend to).