useOnResize: update width & height when mounted
vmihailenco opened this issue · 1 comments
vmihailenco commented
Currently width and height are not updated until window is resized (which may not happen at all). What do you think about using onMounted
to set initial width & height, e.g. add something similar to
vue-composable/packages/vue-composable/src/event/onResize.ts
Lines 39 to 40 in 36c8b57
if (!element.value) {
onMounted(handler)
}
What do you think?
pikax commented
Makes sense, it should wait for mount if you passing a ref