withI18n does not copy over static methods
See original GitHub issueAs stated in React docs when creating a HOC, you need to copy over the static methods,
Some of my components declare static properties, but they are undefined when using withI18n
This fix is simple, the only addition is to call hoistNonReactStatic
over the hoisted and original component
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
statics when using withTranslation · Issue #736 - GitHub
Im using withTranslation with React Navigation and would like to set the headerTitle using static navigationOptions, but when using the ...
Read more >Static HTML Export with i18n compatibility in Next.js - DEV ...
Executing next export when not using i18n seems to work. What if we do not try to use the internationalized routing feature and...
Read more >Why can't interfaces specify static methods? - Stack Overflow
Suppose you could specify in an interface that a type had to have a particular static method... how would you call it? Polymorphism...
Read more >static - JavaScript - MDN Web Docs - Mozilla
Static methods are often utility functions, such as functions to create or clone objects, whereas static properties are useful for caches, fixed ...
Read more >Static Classes and Static Class Members - C# guide
Only one copy of a static member exists, regardless of how many instances of the class are created. Static methods and properties cannot...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Make sense, I’ll add it to keep HOC behavior consistent.
Fixed in latest release v2.3.0.