Skip to content
This repository has been archived by the owner on Apr 9, 2020. It is now read-only.

Add React.PureComponent to the list of default super classes #106

Merged
merged 1 commit into from
Sep 12, 2017

Conversation

rafeca
Copy link
Contributor

@rafeca rafeca commented Aug 31, 2017

This PR enables the HMR transform to work on components that extend React.PureComponent

@@ -1,8 +1,6 @@
export default class Foo extends React.Component {}
export default class extends React.Component {}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this change related to?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the current spec only one default export can exist per module (I guess this has changed since this package was created). Babel now complains about this (maybe because the dependencies in this repo are not locked since it does not use yarn).

@gaearon
Copy link
Owner

gaearon commented Sep 11, 2017

Please ping me in person or via workplace messenger next time :-) I don't actively watch this repository.

@gaearon gaearon merged commit ccd6dc1 into gaearon:master Sep 12, 2017
@gaearon
Copy link
Owner

gaearon commented Sep 12, 2017

3.0.0

@rafeca rafeca deleted the add-reactpurecomponent branch September 12, 2017 14:37
facebook-github-bot pushed a commit to facebook/react-native that referenced this pull request Sep 14, 2017
Summary: babel-plugin-react-transform@3 includes support for HMR on `React.PureComponent`: gaearon/babel-plugin-react-transform#106

Reviewed By: davidaurelio

Differential Revision: D5814322

fbshipit-source-id: 36e83ffa00f9d4ff079665aec1e8341725811a8e
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.

2 participants