Skip to content
New issue

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

To avoid the babel "'this' is not allowed before super()" error #238

Merged
merged 1 commit into from
Apr 4, 2018
Merged

To avoid the babel "'this' is not allowed before super()" error #238

merged 1 commit into from
Apr 4, 2018

Conversation

dorfsmay
Copy link
Contributor

@dorfsmay dorfsmay commented Apr 1, 2018

If you build with babel/webkit (which create-react-app does), this example gives the error:

'this' is not allowed before super()

Adding super(); in the constructor allows it to build properly without error.

@danez
Copy link
Collaborator

danez commented Apr 4, 2018

Thanks, that was indeed wrong.

@danez danez merged commit 4e5b482 into reactjs:master Apr 4, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants