-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Ref gives the wrong element after the first render #87
Comments
Hi Chris - to clarify: is the subsequent re-rendering triggered by setState()/forceUpdate()? |
Hey. Sorry. It's by |
I can try to put together a small example. |
would be useful. Try webpackbin.com if you haven't yet, it's awesome. 👍 |
I'd never heard of webpackbin... It is awesome. Here's the repro. You can click anywhere on the screen to increment the counter. Open up the browser console and you'll see the issue: |
…order components) - related to issue #87.
Fix for this is released in 4.3.0. |
I have a component called
AppPane
which has this render method (simplified):The first
console.log
correctly logs thediv
element. But subsequent renders logAppPane
. I can still accessthis.rootEl.base
to get access to the div, so I do have a workaround.The text was updated successfully, but these errors were encountered: