0.0.1 • Published 1 year ago

vue-use-signal v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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>
0.0.1

1 year ago