Skip to content

Commit a258aa6

Browse files
committed
docs: update readme
1 parent 8edda4d commit a258aa6

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![Github Actions][github-actions-src]][github-actions-href]
66
[![Codecov][codecov-src]][codecov-href]
77

8-
> Package description
8+
> Vue bindings for [Zero](https://zero.rocicorp.dev/)
99
1010
## Usage
1111

@@ -20,9 +20,23 @@ pnpm install zero-vue
2020
```
2121

2222
```js
23-
import {} from 'zero-vue'
23+
import { Zero } from '@rocicorp/zero'
24+
import { useQuery } from 'zero-vue'
25+
26+
// see docs: https://zero.rocicorp.dev/docs/introduction
27+
const z = new Zero({
28+
userID,
29+
server: import.meta.env.VITE_ZERO_SERVER,
30+
schema,
31+
kvStore: 'mem',
32+
})
33+
34+
const users = useQuery(z.query.user)
2435
```
2536

37+
> [!TIP]
38+
> See [the playground](./playground) for a full working example based on [rocicorp/hello-zero](https://github.com/rocicorp/hello-zero).
39+
2640
## 💻 Development
2741

2842
- Clone this repository

0 commit comments

Comments
 (0)