Skip to content

Commit 58180a8

Browse files
Version Packages (#859)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent f097f07 commit 58180a8

File tree

3 files changed

+34
-34
lines changed

3 files changed

+34
-34
lines changed

.changeset/true-files-juggle.md

Lines changed: 0 additions & 33 deletions
This file was deleted.

packages/vue/CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,34 @@
11
# @anywidget/vue
2+
3+
## 0.1.0
4+
5+
### Minor Changes
6+
7+
- Initial release ([`1c5f07a`](https://github.com/manzt/anywidget/commit/1c5f07a736ec749f3cbad6f1ed3ad55e1ef421a6))
8+
9+
Thanks to @aryan02420, we now support Vue with an official framework bridge—similar to our React and Svelte bindings.
10+
11+
Unlike `@anywidget/react`, the `useModelState` hook returns a Vue `ShallowRef` that you can update directly (e.g. `value++`), aligning with Vue’s reactivity model.
12+
13+
```javascript
14+
// src/index.js
15+
import { createRender } from "@anywidget/vue";
16+
import CounterWidget from "./CounterWidget.vue";
17+
18+
const render = createRender(CounterWidget);
19+
export default { render };
20+
```
21+
22+
```vue
23+
<!-- src/CounterWidget.vue -->
24+
<script setup>
25+
import { useModelState } from "@anywidget/vue";
26+
const value = useModelState("value");
27+
</script>
28+
29+
<template>
30+
<button :onClick="() => value++">count is {{ value }}</button>
31+
</template>
32+
```
33+
34+
See the README for build tool configuration.

packages/vue/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@anywidget/vue",
33
"type": "module",
4-
"version": "0.0.0",
4+
"version": "0.1.0",
55
"description": "Vue utilities for anywidget",
66
"license": "MIT",
77
"main": "index.js",

0 commit comments

Comments
 (0)