Section 6: Components and Props
- Split screens into components, naming rules and folder layout
- Pass data with defineProps, including types and default values
- Reactive props destructure in Vue 3.5 and one-way data flow
- Scoped styles, CSS modules and global styles
- Lab: a reusable product card for the product list
Section 7: Lab: Emits, defineModel and provide/inject
- Emit events from child components with defineEmits
- Add v-model support to your own components with defineModel()
- Pass data through many levels with provide and inject instead of an event bus
- Lab: a quantity input bound two ways to the shopping cart
Section 8: Slots, Dynamic Components and Teleport
- Default, named and scoped slots
- Dynamic components with component :is, keeping state with KeepAlive
- Teleport for modals and notifications
- Async components with defineAsyncComponent
- Lab: reusable modal and tab components
Section 9: Lab: Composables
- The composable idea and why it replaces mixins in Vue 3
- Write composables that take inputs and return reactive values
- A data-fetching composable with loading and error states
- Use VueUse for common tasks such as local storage and screen size
- Lab: useCart and useFetch shared across several components
Section 10: Transitions and Animation
- Single-element transitions and the CSS classes for each stage
- Transition modes and transitions between components
- TransitionGroup for lists that add, remove and reorder items
- JavaScript hooks and custom CSS animations
- Lab: animate the product list and the modal