0.0.4 • Published 2 years ago

use-state-vue-sm v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

use-state-vue

Simple replica of React useState() for Vue 3.

Install

npm install use-state-vue

Usage

import useState from 'use-state-vue';

const [count, setCount] = useState(0);
setCount(count + 1);

Idea behind this library

This library tries to replicate the useState() hook present in React.

The equivalent in Vue 3 is something like:

import { ref } from 'vue';

const count = ref(0);
const increment = () => {
  count.value += 1;
};
0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago