@@ -28,7 +28,7 @@ Future-Oriented Programming, `vue-function-api` provides function api from `Vue3
28
28
29
29
# Installation
30
30
31
- ** npm**
31
+ ** npm**
32
32
``` bash
33
33
npm install vue-function-api --save
34
34
```
@@ -162,24 +162,6 @@ const MyComponent = {
162
162
}
163
163
```
164
164
165
- ``` js
166
- import { value } from ' vue-function-api'
167
-
168
- const MyComponent = {
169
- setup (props ) {
170
- const msg = value (' hello' )
171
- const appendName = () => {
172
- msg .value = ` hello ${ props .name } `
173
- }
174
- return {
175
- msg,
176
- appendName
177
- }
178
- },
179
- template: ` <div @click="appendName">{{ msg }}</div>`
180
- }
181
- ```
182
-
183
165
## state
184
166
▸ ** state** (value: * ` any ` * )
185
167
@@ -217,9 +199,9 @@ console.log(countPlusOne.value) // 2
217
199
```
218
200
219
201
## watch
220
- ▸ ** watch** (source: * ` Wrapper | () => any ` * , callback: * ` (newVal, oldVal) ` * , options?: * [ ` WatchOption ` ] ( #WatchOption ) * ): ` Function `
202
+ ▸ ** watch** (source: * ` Wrapper | () => any ` * , callback: * ` (newVal, oldVal) ` * , options?: * [ ` WatchOption ` ] ( #WatchOption ) * ): ` Function `
221
203
222
- ▸ ** watch** (source: * ` Array<Wrapper | () => any> ` * , callback: * ` ([newVal1, newVal2, ... newValN], [oldVal1, oldVal2, ... oldValN]) ` * , options?: * [ ` WatchOption ` ] ( #WatchOption ) * ): ` Function `
204
+ ▸ ** watch** (source: * ` Array<Wrapper | () => any> ` * , callback: * ` ([newVal1, newVal2, ... newValN], [oldVal1, oldVal2, ... oldValN]) ` * , options?: * [ ` WatchOption ` ] ( #WatchOption ) * ): ` Function `
223
205
224
206
The ` watch ` API provides a way to perform side effect based on reactive state changes.
225
207
@@ -331,7 +313,7 @@ const Descendent = {
331
313
332
314
## Context
333
315
The ` context ` object exposes a number of properties that were previously exposed on this in 2.x APIs:
334
-
316
+
335
317
``` js
336
318
const MyComponent = {
337
319
setup (props , context ) {
0 commit comments