@deprecated. This was used to allow clients to pass ref and key to createElement, which is no longer necessary due to intersection types. If you need to declare a props object before passing it to createElement or a factory, use ClassAttributes<T>:

var b: Button | null;
var props: ButtonProps & ClassAttributes<Button> = {
ref: b => button = b, // ok!
label: "I'm a Button"
};
interface Props<T> {
    children?: ReactNode;
    key?: Key;
    ref?: LegacyRef<T>;
}

Type Parameters

  • T

Properties

Properties

children?: ReactNode
key?: Key
ref?: LegacyRef<T>