19 Matching Annotations
  1. Dec 2019
  2. Nov 2019
    1. React guarantees that setState function identity is stable and won’t change on re-renders. This is why it’s safe to omit from the useEffect or useCallback dependency list.
  3. Oct 2019
  4. Sep 2019
  5. Aug 2019
    1. const useFocus = () => { const htmlElRef = useRef(null) const setFocus = () => {htmlElRef.current && htmlElRef.current.focus()} return [ setFocus, htmlElRef ] }

      exampleOf: useRef exampleOf: custom hook