No, you should have your reaction code in the files .tsx, as the docs say :
To use JSX, you have to do two things.
- Name your files the extension .tsx
- Enable jsx option
, typescript :
interface Point {
x: number;
y: number;
}
let p = <Point> {};
tsx , <Point> Point.
- tsx , assert:
let p = {} as Point;
.ts - , , jsx.