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).
1.4m articles
1.4m replys
5 comments
57.0k users