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

Framework: Replace React.addons.PureRenderMixin with react-pure-render #1878

Merged
merged 2 commits into from
Dec 21, 2015

Conversation

aduth
Copy link
Contributor

@aduth aduth commented Dec 21, 2015

This pull request seeks to replace React.addons.PureRenderMixin with the react-pure-render package. React addons were moved to separate packages in React 0.14 and currently cause warnings to appear in development environments. Facebook offers its own react-addons-pure-render-mixin package, but I suggest here that we use the react-pure-render package instead, as it includes a few useful variations for usage (i.e. function for use in React component classes).

Testing instructions:

  • Verify that you can navigate the application without errors.

Code verification:

  • Verify that /addons suffix in React import accurately reflects current existence of addon usage.
  • Ensure that no usage of React.addons.PureRenderMixin remains

Next steps:

We should replace shallowequal usage with react-pure-renders own react-pure-render/shallowEqual module (see #1463, cc @ockham )

@aduth aduth added Framework [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Dec 21, 2015
@@ -1,7 +1,8 @@
/**
* External Dependencies
*/
var React = require( 'react/addons' ),
Copy link
Contributor

Choose a reason for hiding this comment

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

How did React.createClass work before if React was react/addons ?
Did react/addons contain react as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Did react/addons contain react as well?

Yes, react/addons is essentially a superset of React which adds the addons property methods.

@ockham ockham force-pushed the remove/react-addons-pure-render branch from 09bc649 to 0423395 Compare December 21, 2015 18:34
@ockham
Copy link
Contributor

ockham commented Dec 21, 2015

Rebased.

@ockham
Copy link
Contributor

ockham commented Dec 21, 2015

AFAICS, LGTM :-)

@ockham
Copy link
Contributor

ockham commented Dec 21, 2015

At second glance, CREDITS.md attribution seems to be missing.

@ockham
Copy link
Contributor

ockham commented Dec 21, 2015

I'll file a PR for shallowequal.

@aduth
Copy link
Contributor Author

aduth commented Dec 21, 2015

Thanks @ockham ! I'll add the CREDIT and merge shortly thereafter.

@aduth aduth force-pushed the remove/react-addons-pure-render branch from 3878474 to dded938 Compare December 21, 2015 20:17
@aduth aduth added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Dec 21, 2015
aduth added a commit that referenced this pull request Dec 21, 2015
Framework: Replace React.addons.PureRenderMixin with react-pure-render
@aduth aduth merged commit 67f4421 into master Dec 21, 2015
@aduth aduth deleted the remove/react-addons-pure-render branch December 21, 2015 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants