Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sail-sail/vue3_reactivity
vue3_reactivity is forck by @vue/reactivity for deno.
https://github.com/sail-sail/vue3_reactivity
Last synced: 6 days ago
JSON representation
vue3_reactivity is forck by @vue/reactivity for deno.
- Host: GitHub
- URL: https://github.com/sail-sail/vue3_reactivity
- Owner: sail-sail
- License: mit
- Created: 2022-06-23T08:12:46.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-06-23T08:17:59.000Z (over 2 years ago)
- Last Synced: 2024-10-30T01:27:24.802Z (3 months ago)
- Language: TypeScript
- Size: 30.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vue3_reactivity
vue3_reactivity is forck by @vue/reactivity for deno.
## Usage Note
```ts
import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
import { effect, ref } from "./mod.ts";Deno.test("ref", function() {
const a = ref(1);
let dummy = 0;
let calls = 0;
effect(() => {
calls++
dummy = a.value
});
assertEquals(calls, 1);
assertEquals(dummy, 1);
a.value = 2;
assertEquals(calls, 2);
assertEquals(dummy, 2);
});
```For full exposed APIs, see `mod.ts`.
## Credits
The implementation of this module is inspired by the following prior art in the JavaScript ecosystem:
- [Meteor Tracker](https://docs.meteor.com/api/tracker.html)
- [nx-js/observer-util](https://github.com/nx-js/observer-util)
- [salesforce/observable-membrane](https://github.com/salesforce/observable-membrane)## Caveats
- Built-in objects are not observed except for `Array`, `Map`, `WeakMap`, `Set` and `WeakSet`.