vue-use-signal
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

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>

Package Sidebar

Install

npm i vue-use-signal

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

17.6 kB

Total Files

5

Last publish

Collaborators

  • wobsoriano