korajs 0.5.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -49,29 +49,32 @@ Conflicts are resolved automatically. No distributed systems code required.
49
49
 
50
50
  ## React Integration
51
51
 
52
- Install `@korajs/react` alongside this package (`pnpm add @korajs/react`):
52
+ Install `@korajs/react` or import from `korajs/react`:
53
53
 
54
54
  ```tsx
55
- import { KoraProvider, useQuery, useMutation } from '@korajs/react'
56
-
57
- function App() {
58
- return (
59
- <KoraProvider app={app}>
60
- <TodoList />
61
- </KoraProvider>
62
- )
63
- }
64
-
65
- function TodoList() {
66
- const todos = useQuery(app.todos.where({ completed: false }))
67
- const addTodo = useMutation(app.todos.insert)
68
- return todos.map((todo) => <div key={todo.id}>{todo.title}</div>)
69
- }
55
+ import { KoraProvider, useQuery, useMutation } from 'korajs/react'
70
56
  ```
71
57
 
58
+ ## Vue 3 Integration
59
+
60
+ ```typescript
61
+ import { KoraProvider, useQuery, useMutation } from 'korajs/vue'
62
+ ```
63
+
64
+ Requires `vue` and `@korajs/vue` as peer dependencies.
65
+
66
+ ## Svelte Integration
67
+
68
+ ```typescript
69
+ import { createQueryStore, useQuery, useMutation } from 'korajs/svelte'
70
+ import KoraProvider from '@korajs/svelte/KoraProvider.svelte'
71
+ ```
72
+
73
+ Requires `svelte` and `@korajs/svelte` as peer dependencies. Wrap your app with `<KoraProvider app={kora}>` (see `@korajs/svelte` README).
74
+
72
75
  ## Packages
73
76
 
74
- `@korajs/core` | `@korajs/store` | `@korajs/merge` | `@korajs/sync` | `@korajs/server` | `@korajs/react` | `@korajs/devtools` | `@korajs/cli`
77
+ `@korajs/core` | `@korajs/store` | `@korajs/merge` | `@korajs/sync` | `@korajs/server` | `@korajs/react` | `@korajs/vue` | `@korajs/svelte` | `@korajs/devtools` | `@korajs/cli`
75
78
 
76
79
  ## License
77
80