Skip to content

Conversation

@BPScott
Copy link
Member

@BPScott BPScott commented Sep 6, 2019

WHY are these changes introduced?

Adding a displayname to HoCs based upon the wrapped component gives more meaningful feedback in react devtools. This follows react conventions https://reactjs.org/docs/higher-order-components.html#convention-wrap-the-display-name-for-easy-debugging

In devtools previously components like Page that use WithAppProvider looked like WithProvider > Page.

After this PR They look like Page [WithAppProvider] > Page (where [Thing] is a little badge) which is a bit more meaningful.

Screen Shot 2019-09-06 at 1 07 21 PM

WHAT is this pull request doing?

Adds a displayName

How to 🎩

Inspect the defaut playground with react devtools and see a slightly nicer formatting for the Page component

@BPScott BPScott requested a review from perrupa September 6, 2019 20:09
@BPScott BPScott added the 🤖Skip Changelog Causes CI to ignore changelog update check. label Sep 6, 2019
This gives more meaningful feedback in tests and react devtools
Copy link
Contributor

@perrupa perrupa left a comment

Choose a reason for hiding this comment

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

So fast!

@BPScott BPScott merged commit 715a1a3 into master Sep 6, 2019
@BPScott BPScott deleted the hoc-displayname branch September 6, 2019 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖Skip Changelog Causes CI to ignore changelog update check.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants