hooks icon indicating copy to clipboard operation
hooks copied to clipboard

resetState的随机数问题

Open coding-ice opened this issue 9 months ago • 2 comments

@liuyib ,麻烦看可行不,暂时只发现三个

hooks

  • useMap
  • useSet
  • useCounter

before

{
  reset: useMemoizedFn(reset)
}

after

const reset = useCallback(() => {
  setState(initialValue)
}, [])

coding-ice avatar May 15 '24 09:05 coding-ice