Skip to content

Add support for hoisting non-react statics #16

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

Merged
merged 1 commit into from
Feb 5, 2020
Merged

Conversation

Thomas0c
Copy link
Contributor

@Thomas0c Thomas0c commented Feb 4, 2020

First of all - not sure if hoisting non-react statics is of any interest to be supported as part of this library, but wanted to share my solution for non-react static values not being hoisted in the returned component. Just in case someone else can benefit from it.

Issue became evident as I was using react-navigation and react-debounce-render at the same time. The latter would make the former not work since react-navigation navigationOptions are passed as static objects on a per-screen basis. Hoisting the non-react statics solves that.

@podefr
Copy link
Owner

podefr commented Feb 5, 2020

thanks for the suggestion! I wasn't aware of that issue with HoC. I will merge your PR and prepare the new release shortly!

@podefr podefr merged commit ddcc4a6 into podefr:master Feb 5, 2020
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.

2 participants