vue-use-signal
v0.0.1
Published
An experimental Vue composable for TC39 signals
Downloads
4
Readme
vue-use-signal
An experimental Vue composable for TC39 signals
Installation
npm install vue-use-signal
Usage
<script setup>
import { Signal, useSignal } from 'vue-use-signal'
const counter = new Signal.State(0)
const count = useSignal(counter)
const inc = () => counter.set(counter.get() + 1)
</script>
<template>
<button type="button" @click="inc">
count is {{ count }}
</button>
</template>