Created
June 24, 2016 09:38
-
-
Save jacobjuul/57b53e7c9900f4e57db384cd87eee00e to your computer and use it in GitHub Desktop.
Example for @hallandsen on how to get element height
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ReactDOM from 'react-dom'; | |
someMethod() { | |
const elementHeight = ReactDOM.findDOMNode(this.refs.refName).offsetHeight; | |
} | |
render() { | |
return ( | |
<div ref="refName">Some element</div> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment