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

Allow access to the wrapped instance through component.wrappedInstance #29

Merged
merged 1 commit into from
Feb 28, 2018

Conversation

peterkhayes
Copy link
Contributor

This is important if you want to access instance methods on a component
which is wrapped by ReactTimeout. As an example, imagine you have an
input component that needs to use ReactTimeout, but you also want to
be able to focus the input.

The interface is similar to react-redux - see:
https://github.com/reactjs/react-redux/blob/fd436b1e024c4194d3f44dfcef8e30fd24a99a1a/src/components/connectAdvanced.js#:181

Test plan: Added a unit test.

This is important if you want to access instance methods on a component
which is wrapped by `ReactTimeout`. As an example, imagine you have an
input component that needs to use `ReactTimeout`, but you also want to
be able to focus the input.

The interface is similar to `react-redux` - see:
https://github.com/reactjs/react-redux/blob/fd436b1e024c4194d3f44dfcef8e30fd24a99a1a/src/components/connectAdvanced.js#:181

Test plan: Added a unit test.
@plougsgaard
Copy link
Owner

Seems good, I'll look at it in a bit!

@plougsgaard plougsgaard merged commit c618657 into plougsgaard:master Feb 28, 2018
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