Typescript: Create a React Component with conditional props for each variant
Aug 7, 2023 · 2 min read · 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...
Join discussion



