@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>:
varb:Button|null; varprops:ButtonProps&ClassAttributes<Button>={ ref:b=>button=b,// ok! label:"I'm a Button" };
@deprecated. This was used to allow clients to pass
refandkeytocreateElement, which is no longer necessary due to intersection types. If you need to declare a props object before passing it tocreateElementor a factory, useClassAttributes<T>: