Great question I got on Twitter: what are the benefits of returning a function ref from a Vue 3 composable, instead of returning the ref object directly?
Here are two SFC playgrounds to outline the two alternatives:
- function ref
- [ref object](https://sfc.vuejs.org/#eNp9UsFugzAM/ZUol3ZSm9wrqLQPmCbtnEtLTQciTuQENgnx73OAIsamHpCw/d7Dz49evnqvuhbkSWahoMpHESC2/mywst5RFL0gKMUgSnJW7Bi6W43aAB9Qvl9rKOKCUXrdVjEww2DhMCQKNGABEzr/Rd+/GMz0tAN/nYsI1jeXCFwJkd2qLm2SGzkrGHnONHd5nOkFKw9y2u5oL17VwSFb65OCmQfByJMYO6nHhlJt5GeMPpy0DmWRDlIH5eiu+U1Ri7GyoCDY45XcVwBiYSMPKw3Nz