hooks
hooks copied to clipboard
resetState的随机数问题
@liuyib ,麻烦看可行不,暂时只发现三个
hooks
- useMap
- useSet
- useCounter
before
{
reset: useMemoizedFn(reset)
}
after
const reset = useCallback(() => {
setState(initialValue)
}, [])