Skip to content

Instantly share code, notes, and snippets.

@AndrewRayCode
Created March 17, 2020 05:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndrewRayCode/d9781dfe9566195ccbd2e91dc5f5fb89 to your computer and use it in GitHub Desktop.
Save AndrewRayCode/d9781dfe9566195ccbd2e91dc5f5fb89 to your computer and use it in GitHub Desktop.
const Dangus = () => {
const group = useRef();
useThingy(() => {
const { current } = group;
if (current) {
current.prop = 'hi'; // Object is possibly 'undefined'.
}
});
return <thing ref={group}></thing>;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment