Skip to content

Commit

Permalink
chore: mod readme
Browse files Browse the repository at this point in the history
  • Loading branch information
fantasticsoul committed Jan 12, 2024
1 parent d1a021d commit 78d2b4e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ function Demo2() {

```tsx
// 只会引起h1标签内部重渲染
<h1>${numAtom}</h1>
<h1>{$(numAtom)}</h1>

// 格式化
<h1>{$(numAtom, num=>`hi helux ${num.val}`)}</h1>
<h1>{$(numAtom.val, num=>`hi helux ${num}`)}</h1>
```

块响应
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/api/hooks/use-watch-effect.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ order: 4

# useWatchEffect

`useWatchEffect` 功能同 `watchEffect``一样,区别在于 `useWatchEffect` 会立即执行回调,自动对首次运行时函数内读取到的值完成变化监听。
`useWatchEffect` 功能同 `watchEffect`一样,区别在于 `useWatchEffect` 会立即执行回调,自动对首次运行时函数内读取到的值完成变化监听。

:::info
其他使用方式可参考[watchEffect](/api/hooks/use-effect)
Expand Down Expand Up @@ -46,4 +46,4 @@ export default function Comp(props: any) {
</div>
);
}
```
```
2 changes: 1 addition & 1 deletion docs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
"helux-docs/*": ["src/*", "*"]
}
},
"include": [".dumirc.ts", "src/**/*"]
"include": [".dumirc.ts", "src/**/*", "docs/**/*"]
}

0 comments on commit 78d2b4e

Please sign in to comment.