# How define a generic component in react typeScript 

By [0x2529](https://paragraph.com/@yorklee) · 2024-11-11

---

Using `<T,>` we don’t need set default Prop

    interface IProps<T> {
      title: T
    }
    
    export const BaseTable = <T,>({ title }: IProps<T>) => {}

---

*Originally published on [0x2529](https://paragraph.com/@yorklee/how-define-a-generic-component-in-react-typescript)*
