In react, the definition of type ‘ReactElement’ is:
interface ReactElement<P = any, T extends string | JSXElementConstructor<any> = string | JSXElementConstructor<any>> {
type: T;
props: P;
key: Key | null;
}
But I cannot understand what ‘JSXElementConstructor = string’ means.
The type of JSXElementConstructor is:
type JSXElementConstructor<P> =
| ((props: P) => ReactElement<any, any> | null)
| (new (props: P) => Component<any, any>);