Typescript: Create a React Component with conditional props for each variant
You have a lovely component that takes some props.
interface PropsA {
pear: string;
apple: string;
}
const ComponentA: FC<PropsA> = (props) => {
return ///;
};
We then realise that we have another component which looks the same but has a diff...
lwilsondev.co.uk2 min read