2. How to you define types for state and props of a component for Typescript code example
Example: ts react props type
type Props = {
size: string;
}
const Component = ({ size = 'medium' }: Props) => (
<div className={cn('spinner', size)} />
);