My app compiles with .ts, .js, and .jsx files and runs. Now I try changing a .jsx file to .tsx and it breaks.
How do I fix this compile error:
ts-lo
The first issue has to do with "jsx" config as mentioned by Martin. Set "jsx" to "react".
The second issue has to do with your code. Change it like this:
class DiviAppBar extends React.Component<Props, State> ...
Create an interface for your props and another one for your state. If you don't have any use empty objects.
class DiviAppBar extends React.Component<{}, {}> ...