import * as React from 'react'; import * as $ from 'jquery'; export class SimpleDiv extends React.Component{ myRef; constructor(props){ super(props); this.myRef = React.createRef(); } render(){ return
; } getOffset(){ //throw 'Invoked offset'; let element = $(this.myRef.current); return JSON.stringify(element.offset()); } }