Simplified props type management in React

In TypeScript 1.8 with the latest version of react.d.ts (see above), we’ve also greatly simplified the declaration of props types.

Specifically:

  • You no longer need to either explicitly declare ref and key or extend React.Props
  • The ref and key properties will appear with correct types on all components
  • The ref property is correctly disallowed on instances of Stateless Function components