Skip to content

Instantly share code, notes, and snippets.

@ablamunits
Created June 17, 2020 14:42
type InputWithLabelsProps = {
value: string[];
onChange: (value: string[]) => void;
};
// Or, create a reusable generic type
type ValueComponent<T> = {
value: T;
onChange: (value: T) => void;
}
type InputWithLabelsProps = ValueComponent<string[]>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment