useRoot ​
Provides access to the Vuetify instance and the Vue root component instance after mount. This is a low-level hook used internally; most features it was originally designed for have been superseded by Vuetify's useDisplay and the Vuex store.
File: vue/src/js/hooks/useRoot.js
Usage ​
js
import { useRoot } from '@/hooks'
// Currently returns an empty object — see Notes
useRoot()Notes ​
- The hook initialises
vuetifyInstanceandrootInstanceinonMounted, but the reactive state and most methods in it are currently commented out. - It is imported by
useFileanduseImagefor historical reasons; the actual Vuetify display utilities used in those hooks come fromuseDisplaydirectly. - Do not rely on this hook for Vuetify display breakpoints — use Vuetify's
useDisplay()composable instead.
See Also ​
- useNavigationLayout — uses
useDisplayfor responsive layout - useSidebar — uses
useDisplayfor rail/expand behaviour