Skip to content

Conversation

@naholyr
Copy link
Contributor

@naholyr naholyr commented May 9, 2019

Hi, this PR will add a public static property WrappedComponent (tests included) to access original component.

It looks like a de facto standard in higher order components, at least that's what react-router and react-redux do, so I expected any higher order component to do the same. This allows to access original component in a standardized way and access its original static properties (in my case, a loadData property used for server-side data fetching, but that could be anything else).

Thanks for your work!

@dunglas dunglas merged commit 9d94b91 into dunglas:master May 10, 2019
@dunglas
Copy link
Owner

dunglas commented May 10, 2019

Good idea! Thanks @naholyr!

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