score:13

use refs.

first, hook-up a ref attribute on each of your jsx cols element. then, use this ref, inside the componentdidmount method, to access the component's dom node (the actual htmlelement). finally, get element's position / offset or anything else that you need.

const col = react.createclass({
    componentdidmount: function() {
        // this.refs.col1 is the actual dom element,
        // so you can access it's position / offset or whatever
        const offsettop = this.refs.col1.offsettop;
    },

    render() {
        return (
            <div classname="col" ref="col1">
            </div>
        );
    }
});

ps: i am not sure what do you mean by saying element y position. anyways, once you know how to get the dom element (this.refs.col1), you can then use javascript to retrieve the position you need.


Related Query

More Query from same tag