I was told that refs are likely to be deprecated.
How then could I achieve the following, given this code:
export default class DemoAxis extends Component { componentDidMount() { const el = this.refs.line; const dimensions = .getDimensionsFromElement(el); } render() { return ( <div ref="line"> </div> ); }
I need a link to a div line to get dimensions from it.
I know there is a ref callback, should I use this?
reactjs
dagda1
source share