I have 4 instances of a certain React-class. After componentDidMount()
I want to store the y-position of each instance.
How can I address the rendered element? I cannot use classname, because I have 4 elements of the same class with different positions.
My ReactJS component:
const Col = React.createClass({
componentDidMount: function() {
//here address the actual rendered col-instance
},
render() {
return (
<div className='col'>
</div>
);
}
});