react-hooks icon indicating copy to clipboard operation
react-hooks copied to clipboard

Collection of react hooks

Results 27 react-hooks issues
Sort by recently updated
recently updated
newest added

Pick `useArray` as an example, this hook creates a bunch of convenient functions around `Array` types, it manages a local state by using `useState` in its implementation: ```tsx const [list,...

将文档网站添加到项目的关于面板中。 ![image](https://user-images.githubusercontent.com/19852293/118355132-1e70c080-b5a1-11eb-8142-2e28fb114bb6.png)

在某些时候,我们已经有了一个数组,但要对这个数组做额外的修改(对应`derivedState`),但当这个原始数组变化时,我们的额外修改还要保持住。 场景一: > 有一个列表,并且可以新增条目,新增的条目会临时放在列表的最上方向。无论列表是否切换页码、排序,新增条目要保持。 场景二: > 在无限滚动加载的列表中,删除了某些项,此时再滚动增加新内容后,要依然保持删除的项不会出现。 这种情况下,`useDerivedState`是没法用的,因为原始数组变化(翻页、新加载内容)后,就会变成新的数组,原来的新增、删除等操作都没了 所以我们需要一个`useComputedArray`,基于一个原始数组,并在内部以“操作”的形式记录对它的修改,无论原始数组怎么变,都可以把“操作”覆盖上去保留

`useActionPending` actually supports sync function inside its implement except the `pendingCount` state can be incremented and decremented without any meaningful case, the unexpected change of `pendingCount` can cause a performance...

![image](https://user-images.githubusercontent.com/22764514/98238914-14db2000-1fa2-11eb-9fd5-0439d5b24755.png) click 'confirm' or 'close' fail

index document spell intersect incorrectly ![image](https://github.com/ecomfe/react-hooks/assets/26688579/5f9ff6fb-5821-411f-8918-f07d67afc258)

Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.5 to 1.2.8. Changelog Sourced from minimist's changelog. v1.2.8 - 2023-02-09 Merged [Fix] Fix long option followed by single dash [#17](https://github.com/minimistjs/minimist/issues/17) [Tests] Remove duplicate test [#12](https://github.com/minimistjs/minimist/issues/12) [Fix]...

dependencies