@atolljs/vue

Vue bindings — useObservable, useSharedValue, useTask
1,670 1
Install
npm install @atolljs/vue
Latest Version:0.1.14
Vue:3
License:MIT
Last Updated:Oct 14, 2026
Links: GitHub  ·  npm
Maintainer: jwhenry123

@atolljs/vue

CI codecov Socket Badge

Vue bindings for @atolljs/core — composables that bind shared-memory fields and worker tasks to Refs. Subscriptions release via onScopeDispose when the component unmounts.

Atoll — package documentation

Install

npm install @atolljs/core @atolljs/vue

Usage

<script setup lang="ts">
import { useSharedValue, useTask } from '@atolljs/vue';
import { counterMemory } from './counter.memory';
import { counter } from './counter';

const count = useSharedValue(counterMemory, 'count');
const increment = useTask(counter.increment);
</script>

<template>
  <button @click="increment.run(1)">
    count: {{ count ?? '…' }}
  </button>
</template>

API

  • useObservable(source) — subscribe to any ObservableValue snapshot as a Ref.
  • useSharedValue(memory, key, select?, options?) — bind one shared-memory field to a Ref; optional selector + equals.
  • useTask(task | asyncFn) — bind an AsyncTask (or any async fn) to { state: Ref<TaskSnapshot> } plus run/runOnce triggers.

Notes

  • watch() the task's settled Ref to trigger follow-up work after a run.
  • Worker-hosted Vue trees (islands) live in the companion package @atolljs/vue-island.

Documentation

Related Packages

@atolljs/vue-island

Vue shell bindings for atoll-islands islands — useIsland composable, component,...

1,569 1

Version History

Version Released License
0.1.14 MIT
0.1.13 MIT
0.1.12 MIT
0.1.11 MIT
0.1.10 MIT