Skip to content

Commit

Permalink
docs(useReactive): add FAQ about useReactive incompatible with Map, S…
Browse files Browse the repository at this point in the history
…et (#2243)
  • Loading branch information
liuyib committed Jul 5, 2023
1 parent beb4707 commit 1937bd1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/hooks/src/useReactive/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,11 @@ const state = useReactive(initialValue: Record<string, any>);
| Params | Description | Type | Default |
| ------------ | ------------- | --------------------- | ------- |
| initialState | Current state | `Record<string, any>` | - |

## FAQ

### When `useReactive` is used with `Map`, `Set`, it will throw an error or not work?

`useReactive` is not compatible with `Map`, `Set`

Related issues: [#2239](https://github.com/alibaba/hooks/discussions/2239)
8 changes: 8 additions & 0 deletions packages/hooks/src/useReactive/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,11 @@ const state = useReactive(initialState: Record<string, any>);
| 参数 | 说明 | 类型 | 默认值 |
| ------------ | -------------- | --------------------- | ------ |
| initialState | 当前的数据对象 | `Record<string, any>` | - |

## FAQ

### `useReactive``Map``Set` 一起使用时报错或无效?

`useReactive` 目前不兼容 `Map``Set`

相关 issues:[#2239](https://github.com/alibaba/hooks/discussions/2239)

0 comments on commit 1937bd1

Please sign in to comment.