I'm getting this error in an almost empty react component:
"[ts] Unterminated regular expression literal."
import * as React from 'react'; export default class EmptyComponent extends React.Component { render() { return ( <p>Hello</p> ); } }
I don't know what I'm doing wrong!
It turns out I was using the .ts file extension instead of .tsx
Make sure your component file extension is .tsx (if you're using Typescript) or .jsx (if you're using Javascript).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With