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

Fix the displayName of HOC components #798

Merged
merged 1 commit into from
Mar 22, 2019

Conversation

SimeonC
Copy link
Contributor

@SimeonC SimeonC commented Mar 22, 2019

Updating the HOC components to have displayNames consistent with the react docs definition: https://reactjs.org/docs/higher-order-components.html#convention-wrap-the-display-name-for-easy-debugging
This affects some dev tools like react-cosmos that use this format to detect what the "Original" component name is. Also standard is good.

@SimeonC SimeonC force-pushed the fix-HOC-displayName branch from d9fc0fb to 790e07f Compare March 22, 2019 09:04
@coveralls
Copy link

coveralls commented Mar 22, 2019

Coverage Status

Coverage increased (+0.08%) to 93.778% when pulling cfc7073 on SimeonC:fix-HOC-displayName into 61c4645 on i18next:master.

@jamuhl
Copy link
Member

jamuhl commented Mar 22, 2019

I'm not a big fan of adding tons of dependencies...in this case the function is very small -> so please add the function to utils and remove the npm dependency

@SimeonC SimeonC force-pushed the fix-HOC-displayName branch from 790e07f to a2051bb Compare March 22, 2019 10:51
@SimeonC SimeonC force-pushed the fix-HOC-displayName branch from a2051bb to cfc7073 Compare March 22, 2019 10:51
@SimeonC
Copy link
Contributor Author

SimeonC commented Mar 22, 2019

Fair enough, have updated removing the dependency.
I guess this is small enough having multiple versions of the same code in your JS Bundle won't matter so much.

@jamuhl jamuhl merged commit e4e59a5 into i18next:master Mar 22, 2019
@jamuhl
Copy link
Member

jamuhl commented Mar 22, 2019

published in react-i18next@10.5.3

If you like this module don’t forget to star this repo. Make a tweet, share the word or have a look at our https://locize.com to support the devs of this project -> there are many ways to help this project 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants