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

how to get REF of containers component #203

Open
achtan opened this issue Sep 19, 2016 · 0 comments
Open

how to get REF of containers component #203

achtan opened this issue Sep 19, 2016 · 0 comments

Comments

@achtan
Copy link
Contributor

achtan commented Sep 19, 2016

class MyComponent extends React.Component {
  ....
  dataINeed() {
    return this.state
  }
  ...
}

const MyComponentContainer = composeAll(
  composeWithTracker(composer),
  useDeps(mapper)
)(ExamQuestion);


const MainComponent = () => {
  return <div>
    <MyComponent ref={c => console.log(c.dataINeed())} />
    <MyComponentContainer /> // how to get components REF ???
  </div>
}
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

No branches or pull requests

1 participant