0.0.4 • Published 8 months ago

use-state-vue-sm v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months 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

8 months ago

0.0.3

8 months ago

0.0.2

8 months ago

0.0.1

8 months ago

0.0.0

8 months ago