Skip to content

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