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

Support new pure HOC component #1173

Merged
merged 1 commit into from
Oct 1, 2018
Merged

Conversation

bvaughn
Copy link
Contributor

@bvaughn bvaughn commented Sep 28, 2018

Follow up to PR facebook/react#13748

The following code:

function Counter({count}) {
  return <small>{count}</small>;
}
const PureCounterA = React.pure(({count}) => <small>{count}</small>);
const PureCounterB = React.pure(Counter);
const PureCounterC = React.pure(Counter);
PureCounterC.displayName = 'PureCounter';

Will now render the following in DevTools:
screen shot 2018-09-28 at 1 28 13 pm

@bvaughn
Copy link
Contributor Author

bvaughn commented Oct 1, 2018

I'll revert this or iterate on it later if there are concerns.

@bvaughn bvaughn merged commit 6284929 into facebook:master Oct 1, 2018
@bvaughn bvaughn deleted the support-pure-HOC branch October 1, 2018 20:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants