<p><span>Learn the core concepts of Vue.js, the modern JavaScript framework for building frontend applications and interfaces from scratch. Through concise, practical, and clear examples, this book takes web developers step-by-step through the tools and libraries in the Vue.js ecosystem and how to u
Learning Vue: Core Concepts and Practical Patterns for Reusable, Composable, Scalable User Interfaces
β Scribed by Maya Shavin
- Publisher
- OβReilly Media, Inc.
- Year
- 2024
- Tongue
- English
- Leaves
- 350
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
Learn the core concepts of Vue.js, the modern JavaScript framework for building frontend applications and interfaces from scratch. With concise, practical, and clear examples, this book takes web developers step-by-step through the tools and libraries in the Vue.js ecosystem and shows them how to create complete applications for real-world web projects.
Youβll learn how to handle data communication between components with Pinia architecture, develop a manageable routing system for a frontend project to control the application flow, and produce basic animation effects to create a better user experience.
This book also shows you how to:
Create reusable and lightweight component systems using Vue.js
Bring reactivity to your existing static application
Set up a project using Vite.js, a build tool for frontend project code management
Build an interactive state management system for a frontend application with Pinia
Connect external data from the server to your Vue application
Control the application flow with static and dynamic routing using Vue Router
Fully test your application using Vitest and Playwright
β¦ Table of Contents
Copyright
Table of Contents
Preface
Conventions Used in This Book
Using Code Examples
OβReilly Online Learning
How to Contact Us
Acknowledgments
Chapter 1. Welcome to the Vue.js World!
What Is Vue.js?
The Benefits of Vue in Modern Web Development
Installing Node.js
NPM
Yarn
Vue Developer Tools
Vite.js as a Builder Management Tool
Create a New Vue Application
File Repository Structure
Summary
Chapter 2. How Vue Works: The Basics
Virtual DOM Under the Hood
The Layout Update Problem
What Is Virtual DOM?
How Virtual DOM Works in Vue
The Vue App Instance and Options API
Exploring the Options API
The Template Syntax
Creating Local State with Data Properties
How Reactivity in Vue Works
Two-Way Binding with v-model
Using v-model.lazy Modifier
Binding Reactive Data and Passing Props Data with v-bind
Binding to Class and Style Attributes
Iterating over Data Collection Using v-for
Iterating Through Object Properties
Make the Element Binding Unique with Key Attribute
Adding Event Listener to Elements with v-on
Handling Events with v-on Event Modifiers
Detecting Keyboard Events with Key Code Modifiers
Conditional Rendering Elements with v-if, v-else, and v-else-if
Conditional Displaying Elements with v-show
Dynamically Displaying HTML Code with v-html
Displaying Text Content with v-text
Optimizing Renders with v-once and v-memo
Registering a Component Globally
Summary
Chapter 3. Composing Components
Vue Single File Component Structure
Using defineComponent() for TypeScript Support
Component Lifecycle Hooks
setup
beforeCreate
created
beforeMount
mounted
beforeUpdate
updated
beforeUnmount
unmounted
Methods
Computed Properties
Watchers
Observing for Changes in Nested Properties
Using the this.$watch() Method
The Power of Slots
Using Named Slots with Template Tag and v-slot Attribute
Understanding Refs
Sharing Component Configuration with Mixins
Scoped Styling Components
Applying CSS to a Child Component in Scoped Styles
Applying Scoped Styles to Slot Content
Accessing a Componentβs Data Value in Style Tag with v-bind() Pseudo-Class
Styling Components with CSS Modules
Summary
Chapter 4. Interactions Between Components
Nested Components and Data Flow in Vue
Using Props to Pass Data to Child Components
Declaring Prop Types with Validation and Default Values
Declaring Props with Custom Type Checking
Declaring Props Using defineProps() and withDefaults()
Communication Between Components with Custom Events
Defining Custom Events Using defineEmits()
Communicate Between Components with provide/inject Pattern
Using provide to Pass Data
Using inject to Receive Data
Teleport API
Implementing a Modal with Teleport and the
π SIMILAR VOLUMES
<p>Learn the core concepts of Vue.js, the modern JavaScript framework for building frontend applications and interfaces from scratch. With concise, practical, and clear examples, this book takes web developers step-by-step through the tools and libraries in the Vue.js ecosystem and shows them how to
Code <p><b>Get to grips with the core fundamentals of Vue.js 2 and learn to build reliable component-based applications with practical guidance from industry experts</b></p><h4>Key Features</h4><ul><li>Learn how to make the best use of the Vue.js 2 framework and build a full end-to-end project</li>
Get to grips with the core fundamentals of Vue.js and learn to build reliable component-based applications with practical guidance from industry experts. Key Features - Learn how to make the best use of the Vue framework and build a full end-to-end project - Build dynamic components and user in
Get to grips with the core fundamentals of Vue.js and learn to build reliable component-based applications with practical guidance from industry experts. Key Features - Learn how to make the best use of the Vue framework and build a full end-to-end project - Build dynamic components and user in
<p><b>Get to grips with the core fundamentals of Vue.js 2 and learn to build reliable component-based applications with practical guidance from industry experts</b></p><h4>Key Features</h4><ul><li>Learn how to make the best use of the Vue.js 2 framework and build a full end-to-end project</li><li>Bu