Created
July 20, 2020 07:35
-
-
Save aurimasmi/401fae7007ea771805fa6753f12b459d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const myRef = useRef(null); | |
const onRef = useCallback(ref => { | |
if (ref.current) { | |
myRef.current = ref; | |
// Do some actions with ref | |
} | |
}); | |
return ( | |
<View ref={onRef} /> | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment