For many of my d3 use cases, I'm using the width and height values to calculate scales and/or shapes before rendering. Could you add a way to accept an initial dimension object so that width and height will always be defined? For example,
const [ref, { width, height }] = useDimensions({ width: 100, height: 100 });