-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
// Consider using a dyamic component: Example
export const DynamicComponent = forwardRef(({ as, children, ...props }, ref) => {
const Component = as;
return (<Component ref={ref} {...props}>{children}</Component>);
});
// Use case: The TextField is a MUI component
<DynamicComponent as={TextField} />Metadata
Metadata
Assignees
Labels
No labels