Edit 2022:
with react 18, FC no longer provides children, so you have to type it yourself, and you can drop FC:
import React, { ReactNode } from "react";
interface Props {
children?: ReactNode
// any props that come into the component
}
const Button1 = ({ children, ...props }: Props) => (
<Button {...props}>{children}</Button>
);
Yes you are missing a type for Props as whole, which means typescript sees it as any and your ts rules dont allow it.
You have to type your props as:
import React, { FC } from "react";
interface Props {
// any props that come into the component
}
const Button1: FC<Props> = ({ children, ...props }) => (
<Button {...props}>{children}</Button>
);