DEV Community

Discussion on: Typescript. Simple React components.

mbrtn profile image
Ruslan Shashkov • Edited on

It also would be better to use Extract on the shared button props to extract only InputHTMLAttributes<HTMLInputElement> props for <button {...extractedProps}>. In case if you decided to use some custom props for example loading: boolean it will also be sent to <button/> and cause warnings that your loading prop is not in default button props.