Skip to content

Instantly share code, notes, and snippets.

@onosendi
Last active December 28, 2021 19:44
Show Gist options
  • Save onosendi/5b6a8218898aa6d0e881737352c483b3 to your computer and use it in GitHub Desktop.
Save onosendi/5b6a8218898aa6d0e881737352c483b3 to your computer and use it in GitHub Desktop.
React named function declarations
const ForwardRef = React.forwardRef(({}, ref) => {
return <div ref={ref}>Foo</div>;
});
export default ForwardRef;
export default function FunctionalComponent() {
return null;
}
function Memo() {
return null;
}
export default React.memo(Memo);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment