resetState的随机数问题
Open
- Dominant language
- TypeScript
- Stars
- 15k
- Forks
- 2.8k
- Avg merge
- 15h 7m
- Merged PRs (30d)
- 2
Description
@liuyib ,麻烦看可行不,暂时只发现三个
### hooks
- useMap
- useSet
- useCounter
### before
```js
{
reset: useMemoizedFn(reset)
}
```
### after
```js
const reset = useCallback(() => {
setState(initialValue)
}, [])
```
Contributor guide
Research direction
Search for the reset implementations in useMap, useSet, and useCounter, then compare their current behavior with the before/after snippets. Confirm the affected hooks reset deterministically to their initial values; the issue names no test file or command, so validation guidance is not provided.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100