@@ -96,7 +96,7 @@ Creates reactive primitive values:
9696import { ref } from 'vue'
9797
9898const count = ref(0)
99- </ /script>
99+ <\ / script>
100100
101101<template>
102102 <button @click="count++">Count: {{ count }}</button>
@@ -115,19 +115,19 @@ const count = ref(0)
115115watch(count, (newVal, oldVal) => {
116116 console.log(\` Count changed from \$ {oldVal} to \$ {newVal}\` )
117117})
118- </ /script>
118+ <\ / script>
119119\`\`\`
120120
121121## When to Use the Composition API
122122
123- - ✅ **For complex logic** — Easier to organize and reuse reactive state
124- - ✅ **For reusable code** — Create your own composables (like custom hooks)
125- - ✅ **For TypeScript support** — More type-friendly than Options API
123+ - ✅ **For complex logic** — Easier to organize and reuse reactive state
124+ - ✅ **For reusable code** — Create your own composables (like custom hooks)
125+ - ✅ **For TypeScript support** — More type-friendly than Options API
126126- ❌ **For simple components** — The Options API might be enough
127127
128128## Rules of the Composition API
129129
130- 1. Only use Vue composables **inside \` setup()\` ** or other composables
130+ 1. Only use Vue composables **inside \` setup()\` ** or other composables
1311312. Always return what you want to use in your template from \` setup()\`
132132
133133Would you like to explore more advanced composables like \` computed\` or \` onMounted\` ? ` ,
@@ -138,11 +138,11 @@ Would you like to explore more advanced composables like \`computed\` or \`onMou
138138
139139Here are the most common composables:
140140
141- - **ref()** — creates reactive primitive values
142- - **reactive()** — makes entire objects reactive
143- - **computed()** — creates derived reactive values
144- - **watch()** — runs side effects on data changes
145- - **onMounted()** — lifecycle hook for when a component is mounted
141+ - **ref()** — creates reactive primitive values
142+ - **reactive()** — makes entire objects reactive
143+ - **computed()** — creates derived reactive values
144+ - **watch()** — runs side effects on data changes
145+ - **onMounted()** — lifecycle hook for when a component is mounted
146146
147147Here's a simple example:
148148
@@ -155,7 +155,7 @@ const count = ref(0)
155155onMounted(() => {
156156 console.log('Component mounted!')
157157})
158- </ /script>
158+ <\ / script>
159159
160160<template>
161161 <button @click="count++">Clicked {{ count }} times</button>
@@ -170,9 +170,9 @@ Which specific composable would you like to learn more about?`,
170170
171171## Key Benefits
172172
173- 1. **Cleaner code organization** — Group related logic by feature
174- 2. **Reusable logic** — Build and share your own composables
175- 3. **Better TypeScript support** — Stronger typing than the Options API
173+ 1. **Cleaner code organization** — Group related logic by feature
174+ 2. **Reusable logic** — Build and share your own composables
175+ 3. **Better TypeScript support** — Stronger typing than the Options API
176176
177177## Most Popular Composables
178178
0 commit comments