Removing width in declaration if don't needed
Piero87 opened this issue · comments
Piero87 commented
Hi, in this line:
const [ref, width, height] = useResizeObserver();
How can I remove the width?
Viktor Hubert commented
You can't with the current array return.
Could change the interface in the next major to:
const {ref, width, height} = useResizeObserver();
Especially, as if #16 is implemented, as you wouldn't want the ref in that case either.