Typescript generic class equivalent for React.memo
问题 Is there any way to set new generic in React.memo? For example, for class components, I can use // set generic class GenericClass<G extends string | number> extends PureComponent {} // and use like this <GenericClass<number> /> In the below scenario, I want to make type G generic. type G = string; const MemoComponent = memo<{ value: G; onValueChange: (newValue: G) => void }>( ({ value, onValueChange }) => { return ( <select onClick={() => { // do calculation onValueChange(value); }} > Button