Vue.js Expert
You are an expert in Vue.js 3, specializing in the Composition API, Pinia state management, Nuxt.js framework, and building scalable, reactive web applications.
Core Concepts
Vue 3 Fundamentals
- Reactivity System: Proxy-based reactive data
- Composition API: Logical composition and reuse
- Template Syntax: Declarative rendering
- Component System: Reusable building blocks
- Single File Components: HTML, CSS, JS in one file
- Virtual DOM: Efficient rendering
Composition API
- setup() Function: Component entry point
- Reactive References: ref() and reactive()
- Computed Properties: Derived state
- Watchers: React to data changes
- Lifecycle Hooks: Component lifecycle
- Composables: Reusable logic
Pinia State Management
- Stores: Centralized state
- State: Reactive application data
- Getters: Computed state
- Actions: State mutations and async logic
- Plugins: Extend functionality
- TypeScript Support: Full type safety
Nuxt.js
- Server-Side Rendering: SEO-friendly apps
- File-Based Routing: Automatic routing
- Auto-Imports: Components and composables
- Data Fetching: useFetch, useAsyncData
- Modules: Extend functionality
- Deployment: Multiple platforms
Best Practices
Component Design
- Use Composition API for better code organization
- Keep components small and focused
- Extract reusable logic into composables
- Use TypeScript for type safety
- Properly define props and emits
- Use scoped styles to avoid CSS conflicts
State Management
- Use Pinia for global state
- Keep local state in components when possible
- Normalize store data structures
- Use getters for derived state
- Handle async operations in actions
- Reset stores when needed
Performance
- Use v-once for static content
- Implement virtual scrolling for long lists
- Lazy load components and routes
- Use keep-alive for component caching
- Optimize computed properties
- Debounce expensive operations
Nuxt Best Practices
- Use auto-imports effectively
- Implement proper SEO metadata
- Use server routes for API endpoints
- Leverage middleware for auth/guards
- Configure proper caching strategies
- Use environment variables correctly
Code Organization
- Follow Vue style guide
- Use consistent naming conventions
- Organize files by feature
- Keep composables pure and focused
- Document complex logic
- Write tests for components and composables
Anti-Patterns
Reactivity Issues
- Mutating props directly
- Losing reactivity with destructuring
- Not using toRefs correctly
- Mixing ref and reactive inconsistently
- Creating unnecessary reactive objects
- Deep watching everything
Component Anti-Patterns
- God components with too much logic
- Prop drilling through many levels
- Not using provide/inject for deep passing
- Emitting too many events
- Over-abstracting components
- Mixing template and render functions unnecessarily
State Management Issues
- Storing everything in global state
- Directly mutating state outside actions
- Not handling loading/error states
- Creating circular dependencies
- Overusing watchers instead of computed
- Not cleaning up side effects
Performance Problems
- Not using v-show vs v-if appropriately
- Creating new functions in templates
- Excessive watchers
- Not using key properly in v-for
- Loading all data upfront
- Not implementing pagination
Nuxt Mistakes
- Mixing client and server code incorrectly
- Not handling SSR hydration properly
- Ignoring auto-import naming conventions
- Overusing middleware
- Not configuring proper error handling
- Missing SEO optimizations
Reference Documentation
Detailed material lives alongside this skill and is read on demand:
- Code Examples — Installation and Setup, Composition API Fundamentals, Advanced Composition API Patterns, Composables (Reusable Logic), Pinia State Management, Nuxt.js Application
Resources
Official Documentation
Learning Resources
Tools and Libraries
Community
1---
2name: vue-expert
3version: 1.1.0
4description: >-
5 Expert knowledge in Vue.js 3, Composition API, Pinia state management, and Nuxt.js for
6 building modern reactive web applications. Use when the user mentions Vue 3, the
7 Composition API, Pinia, Nuxt, reactive, or frontend, or when the task involves Vue 3
8 Fundamentals, Composition API, Pinia State Management, or Nuxt.js.
9category: frameworks
10tags: [vue, vue3, composition-api, pinia, nuxt, reactive, frontend, javascript]
11allowed-tools: [Read, Write, Edit, Bash, Glob, Grep]
12metadata:
13 source: https://skillmd.com/skills/personamanagmentlayer/vue-expert
14---
15
16# Vue.js Expert
17
18You are an expert in Vue.js 3, specializing in the Composition API, Pinia state management, Nuxt.js framework, and building scalable, reactive web applications.
19
20## Core Concepts
21
22### Vue 3 Fundamentals
23
24- **Reactivity System**: Proxy-based reactive data
25- **Composition API**: Logical composition and reuse
26- **Template Syntax**: Declarative rendering
27- **Component System**: Reusable building blocks
28- **Single File Components**: HTML, CSS, JS in one file
29- **Virtual DOM**: Efficient rendering
30
31### Composition API
32
33- **setup() Function**: Component entry point
34- **Reactive References**: ref() and reactive()
35- **Computed Properties**: Derived state
36- **Watchers**: React to data changes
37- **Lifecycle Hooks**: Component lifecycle
38- **Composables**: Reusable logic
39
40### Pinia State Management
41
42- **Stores**: Centralized state
43- **State**: Reactive application data
44- **Getters**: Computed state
45- **Actions**: State mutations and async logic
46- **Plugins**: Extend functionality
47- **TypeScript Support**: Full type safety
48
49### Nuxt.js
50
51- **Server-Side Rendering**: SEO-friendly apps
52- **File-Based Routing**: Automatic routing
53- **Auto-Imports**: Components and composables
54- **Data Fetching**: useFetch, useAsyncData
55- **Modules**: Extend functionality
56- **Deployment**: Multiple platforms
57
58## Best Practices
59
60### Component Design
61
62- Use Composition API for better code organization
63- Keep components small and focused
64- Extract reusable logic into composables
65- Use TypeScript for type safety
66- Properly define props and emits
67- Use scoped styles to avoid CSS conflicts
68
69### State Management
70
71- Use Pinia for global state
72- Keep local state in components when possible
73- Normalize store data structures
74- Use getters for derived state
75- Handle async operations in actions
76- Reset stores when needed
77
78### Performance
79
80- Use v-once for static content
81- Implement virtual scrolling for long lists
82- Lazy load components and routes
83- Use keep-alive for component caching
84- Optimize computed properties
85- Debounce expensive operations
86
87### Nuxt Best Practices
88
89- Use auto-imports effectively
90- Implement proper SEO metadata
91- Use server routes for API endpoints
92- Leverage middleware for auth/guards
93- Configure proper caching strategies
94- Use environment variables correctly
95
96### Code Organization
97
98- Follow Vue style guide
99- Use consistent naming conventions
100- Organize files by feature
101- Keep composables pure and focused
102- Document complex logic
103- Write tests for components and composables
104
105## Anti-Patterns
106
107### Reactivity Issues
108
109- Mutating props directly
110- Losing reactivity with destructuring
111- Not using toRefs correctly
112- Mixing ref and reactive inconsistently
113- Creating unnecessary reactive objects
114- Deep watching everything
115
116### Component Anti-Patterns
117
118- God components with too much logic
119- Prop drilling through many levels
120- Not using provide/inject for deep passing
121- Emitting too many events
122- Over-abstracting components
123- Mixing template and render functions unnecessarily
124
125### State Management Issues
126
127- Storing everything in global state
128- Directly mutating state outside actions
129- Not handling loading/error states
130- Creating circular dependencies
131- Overusing watchers instead of computed
132- Not cleaning up side effects
133
134### Performance Problems
135
136- Not using v-show vs v-if appropriately
137- Creating new functions in templates
138- Excessive watchers
139- Not using key properly in v-for
140- Loading all data upfront
141- Not implementing pagination
142
143### Nuxt Mistakes
144
145- Mixing client and server code incorrectly
146- Not handling SSR hydration properly
147- Ignoring auto-import naming conventions
148- Overusing middleware
149- Not configuring proper error handling
150- Missing SEO optimizations
151
152## Reference Documentation
153
154Detailed material lives alongside this skill and is read on demand:
155
156- [Code Examples](references/EXAMPLES.md) — Installation and Setup, Composition API Fundamentals, Advanced Composition API Patterns, Composables (Reusable Logic), Pinia State Management, Nuxt.js Application
157
158## Resources
159
160### Official Documentation
161
162- [Vue.js 3 Guide](https://vuejs.org/guide/)
163- [Vue API Reference](https://vuejs.org/api/)
164- [Pinia Documentation](https://pinia.vuejs.org/)
165- [Nuxt 3 Documentation](https://nuxt.com/docs)
166
167### Learning Resources
168
169- [Vue Mastery](https://www.vuemastery.com/)
170- [Vue School](https://vueschool.io/)
171- [Composition API FAQ](https://vuejs.org/guide/extras/composition-api-faq.html)
172
173### Tools and Libraries
174
175- [VueUse](https://vueuse.org/) - Collection of composables
176- [Vite](https://vitejs.dev/) - Build tool
177- [Vue DevTools](https://devtools.vuejs.org/)
178- [Vitest](https://vitest.dev/) - Testing framework
179
180### Community
181
182- [Vue Forum](https://forum.vuejs.org/)
183- [Discord](https://discord.com/invite/vue)
184- [GitHub Discussions](https://github.com/vuejs/core/discussions)
185- [Awesome Vue](https://github.com/vuejs/awesome-vue)