React.ButtonHTMLAttributes vs ComponentProps<"button">
What is the correct way to provide a type for reusable buttons in React TS?
interface LoadingButtonProps extends ComponentProps<"button"> {
loading: boolean;
}
OR
interface LoadingButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
loading: boolean;
}
What's the difference between both of them?