Skip to content

Commit

Permalink
feat: 新增reactive响应式
Browse files Browse the repository at this point in the history
  • Loading branch information
TingShine committed Dec 18, 2022
1 parent e94d5ad commit c87d72a
Show file tree
Hide file tree
Showing 11 changed files with 18,008 additions and 5 deletions.
17 changes: 17 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { reactive } from './packages/reactive/reactive';
import { effect } from './packages/reactive/effect';

const form = reactive({
count: 1
})

let calls = 0;

effect(() => {
console.log(form);
calls++
})

form.count = 2;
console.log(calls);

4 changes: 4 additions & 0 deletions nodemon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"verbose": true,
"watch": ["/test.ts", "/packages/**/*"]
}
Loading

0 comments on commit c87d72a

Please sign in to comment.