Creating a generic based component
Most of the examples I see for typing components look like this:
The problem is that with this pattern, I am not sure how I would go about creating a typescript generic based component. For example, in React I would normally do:
While it seems like I can do the above in SolidJS,
Is there a standard way of creating a typescript generic based component in SolidJS or do I need to explicitly define
The problem is that with this pattern, I am not sure how I would go about creating a typescript generic based component. For example, in React I would normally do:
While it seems like I can do the above in SolidJS,
props in this case not longer has children as a prop (and I can't do props: ParentComponent<MyComponentProps<TData>> as that causes other typing errors).Is there a standard way of creating a typescript generic based component in SolidJS or do I need to explicitly define
children in the props type?