Section 6: Reactivity in Depth
- How ref and reactive differ, and shallowRef for large data
- toRef, toRefs, toValue and readonly
- watch with once and depth levels, watchEffect and onWatcherCleanup
- Lifecycle hooks and effectScope
Section 7: Lab: Designing Reusable Composables
- Accept MaybeRefOrGetter inputs and read them with toValue
- Handle loading, errors and request cancellation
- Clean up events and timers when a component is destroyed
- Lab: a usePosts composable with fetching, paging and search
Section 8: Lab: VueUse for the Browser and Sensors
- useTitle, useClipboard, and themes with useDark and useColorMode
- Keyboard, mouse and touch with useMagicKeys and usePointer
- useScroll, useElementVisibility and useMediaQuery
- Lab: a toolbar with keyboard shortcuts and dark mode
Section 9: Lab: VueUse for Animation, State and Utilities
- useIntervalFn, useRafFn and useTransition
- useRefHistory for undo and useStorage for persistent data
- useFetch, computedAsync and refAutoReset
- Lab: an edit form with undo and automatic draft saving
Section 10: Lab: Advanced Components
- Renderless components and scoped slots
- Custom directives for reusable behaviour
- Teleport, KeepAlive and async components
- Lab: a data list component with switchable display styles