We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<button onClick={=> alert('hi') // ❌ this comment causes parse error } >
<button onClick={=> alert('hi') /* ❌ this comment causes parse error */ } >
<button onClick={=> alert('hi') // ✅ this works alert('hi again') } >
<button onClick={=> alert('hi') /* ✅ this works */ alert('hi again') } >
Don't put a comment at the end of a the function
Put semicolon at the end (if you don't need to return anything)
<button onClick={=> alert('hi') /* ✅ this works */ ; } >
|> return
<button onClick={=> getUser() /* ✅ this works */ |> return } >
The text was updated successfully, but these errors were encountered:
Interesting! Thanks for the report. This example gives a little insight into what might be going wrong here:
=> alert('hi') // foo
becomes
() => { return alert('hi') } // foo
In addition to the JSX application, it might be nice for the comment to be brought into the block (at least when it's properly indented like this).
Yet another example that fails:
<button onClick= => alert('hi') // ❌ this comment causes parse error >
Sorry, something went wrong.
No branches or pull requests
❌ The following will cause parse errors:
✅ The following will not cause parse errors:
Workarounds:
Don't put a comment at the end of a the function
Put semicolon at the end (if you don't need to return anything)
|> return
to the end of your functionThe text was updated successfully, but these errors were encountered: