Skip to content

Instantly share code, notes, and snippets.

View mattrothenberg's full-sized avatar
🍕
mmm, pizza

Matt Rothenberg mattrothenberg

🍕
mmm, pizza
View GitHub Profile
import * as React from 'react';
const useIsFirstRender = (): boolean => {
const isFirst = React.useRef(true);
if (isFirst.current) {
isFirst.current = false;
return true;
} else {