hooks icon indicating copy to clipboard operation
hooks copied to clipboard

New Hooks progress and ideas

Open brickspert opened this issue 5 years ago • 20 comments

  • Hooks development progress tracking
  • If you have new Hooks ideas you can follow up

  • 新增 Hooks 开发进度追踪
  • 如果你有新的 Hooks 想法可以追评

brickspert avatar Jun 27 '20 10:06 brickspert

Name RFC Developer Stage Remark
useTimeout #527 @awmleer -
useInterval #437 @awmleer -
useCookie #455 @Straw94 -
useNetwork #512 @brickspert -
useTitle - @chenbin92 -
useUrlState - @tty006 -
useSetState #463 @brickspert -
useWhyDidYouUpdate #471 @zhaofinger -
useWebSocket - - -
useAnimation - - - Like use-web-animations, useAnimation

brickspert avatar Jun 27 '20 10:06 brickspert

useEasyReducer #502

Zousdie avatar Jul 09 '20 11:07 Zousdie

useCountDown #576

linbudu599 avatar Aug 10 '20 12:08 linbudu599

useFavicon #581

linbudu599 avatar Aug 11 '20 09:08 linbudu599

useImperativeInterval #583

linbudu599 avatar Aug 12 '20 03:08 linbudu599

useVerifyCode #584

linbudu599 avatar Aug 12 '20 03:08 linbudu599

useReactive & useMethods #615

wen-haoming avatar Aug 29 '20 01:08 wen-haoming

useClipboard #715

turkyden avatar Nov 09 '20 17:11 turkyden

useExternal #758

turkyden avatar Dec 01 '20 10:12 turkyden

useUnmountedRef #760

syfless1999 avatar Dec 02 '20 07:12 syfless1999

~~useFixPage #774~~ Close

susiwen8 avatar Dec 06 '20 15:12 susiwen8

useMeta #781

MisaGu avatar Dec 09 '20 09:12 MisaGu

useJsonView #785

codeXgea avatar Dec 11 '20 02:12 codeXgea

useMergeState #794

codeXgea avatar Dec 14 '20 09:12 codeXgea

useRequest、useAntdTable等hooks 提供拦截器

wlc534 avatar May 20 '21 07:05 wlc534

useEventListener #966

bigbigDreamer avatar Jun 02 '21 09:06 bigbigDreamer

useOrder #990

MrHeer avatar Jun 17 '21 10:06 MrHeer

建议可以参考下 react-use,把里面没有的都实现了,个人更喜欢用 ahooks 但是有的功能没有,react-use 更新太慢了,也没人回答问题

yf-hk avatar Oct 29 '21 10:10 yf-hk

useGetState: 在普通 useState 返回值中增加 getter 方法穿透闭包获取最新值 #1306

CJY0208 avatar Nov 17 '21 02:11 CJY0208

Getter setter should be added for useState. For example, where I use the state variable, if its value is empty, it should send a request to the api. However, this may cause it to send the same request more than once in duplicate components.

For example, when we normally assign a value to a state variable by request, we use the following structure.

const [state, setState] = useState();

const { run } = useRequest(getStateValue);

useEffect(() => {
   run();
}, [])

In some cases we use the same state variable in other pages, it's pointless to repeat this code for each page. For example, when using the ant design useModel hook, if the data is empty, I have to put this code at the beginning of the pages I need. Instead of doing all this, when I just call the state variable, the code should do it without background conflict, it should not send it again if a request has been sent before, it should call it from there if the state value is filled.

useReqState

xXAvoraXx avatar Mar 04 '22 16:03 xXAvoraXx