React TypeScript TypeScript React Hooks // add type before parensReact.useState<boolean>(false);React.useRef<HTMLDivElement>(null);React.useCallback( function () { if (theMoon) { setSomethingAwesome(); } }, [theMoon],); Props type FooProps = { children: React.ReactNode;}; Components // functionalconst Foo: React.FC<FooProps> = (props) => ()// classclass Foo extends React.Component<FooProps> {} emotion const Foo = styled<FooProps>.div``;