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

React 16 Support #56

Closed
alexprice1 opened this issue Oct 3, 2017 · 2 comments · Fixed by #57
Closed

React 16 Support #56

alexprice1 opened this issue Oct 3, 2017 · 2 comments · Fixed by #57

Comments

@alexprice1
Copy link

Is there a timeline to add React 16 support?

@alexf101
Copy link

alexf101 commented Feb 5, 2018

A quick FYI to help out other unwary souls:

We just upgraded ourselves to React 16, and noticed that refs defined on the content of react-tether nodes are no longer available to the parent node in componentDidMount.

I believe this is a side-effect of the changes around rendering for components that call ReactDOM.render within their render functions (something something portals?).

E.g. we used to have:

editableTooltipThatFocusContentOnMount() {
  componentDidMount() {
    this.input.focus();
 }
 render() {
    return <ReactTether ...>
      <input ref={el => this.input = el} />
    </ReactTether
  }
}

This no longer works, the ref won't be defined yet. Instead, you need to call focus from the ref.

Hope this helps someone...

@danreeves
Copy link
Owner

@alexprice1 Thanks for letting me know, I'll investigate when I get some time

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 a pull request may close this issue.

3 participants