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
Merged

Conversation

@SimeonC
Copy link
Contributor

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 SimeonC:fix-HOC-displayName branch from d9fc0fb to 790e07f Mar 22, 2019
@coveralls

This comment has been minimized.

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

This comment has been minimized.

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 SimeonC:fix-HOC-displayName branch from 790e07f to a2051bb Mar 22, 2019
@SimeonC SimeonC force-pushed the SimeonC:fix-HOC-displayName branch from a2051bb to cfc7073 Mar 22, 2019
@SimeonC

This comment has been minimized.

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
4 checks passed
4 checks passed
ci/circleci: build Your tests passed on CircleCI!
Details
codeclimate All good!
Details
coverage/coveralls Coverage increased (+0.08%) to 93.778%
Details
workflow Workflow: workflow
Details
@jamuhl

This comment has been minimized.

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
Projects
None yet
3 participants
You can’t perform that action at this time.