摘要:
useRef在网上看了好几篇博客+自己理解 let lastRef function useRef(value){ lastRef = lastRef || {current:value} return lastRef } 我们利用这个useRef可以绑定dom,还可以自定义hook,这里我主要讲下 阅读全文
摘要:
要知道useReducer是useState的语法糖 function useState (initial){ return useReducer(null,initial) } function useReducer(reducer,initialState){ hookStates[hookIn 阅读全文