Skip to content

Commit 6dd0112

Browse files
committed
fix readme
1 parent 1e71e9b commit 6dd0112

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,26 +52,26 @@ app.use(createZero(new Zero({
5252

5353
Creating `useZero` composable:
5454
```ts
55-
// Typed:
56-
import { createUseZero } from 'zero-vue'
57-
import type { Schema } from './schema.ts'
5855
import type { Mutators } from './mutators.ts'
56+
import type { Schema } from './schema.ts'
57+
import { createUseZero } from 'zero-vue'
58+
59+
// Typed:
5960
export const useZero = createUseZero<Schema, Mutators>()
6061

6162
// Untyped:
62-
import { createUseZero } from 'zero-vue'
6363
export const useZero = createUseZero()
6464
```
6565

6666
To query data:
6767
```js
6868
import { useQuery } from 'zero-vue'
6969
import { useZero } from './use-zero.ts'
70+
7071
const z = useZero()
7172
const { data: users } = useQuery(z.value.query.user)
7273
```
7374

74-
7575
> [!TIP]
7676
> See [the playground](./playground) for a full working example based on [rocicorp/hello-zero](https://github.com/rocicorp/hello-zero), or check out [danielroe/hello-zero-nuxt](https://github.com/danielroe/hello-zero-nuxt) to see how to set things up with [Nuxt](https://nuxt.com/).
7777

0 commit comments

Comments
 (0)