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
andkey
orextend React.Props
- The
ref
andkey
properties will appear with correct types on all components - The
ref
property is correctly disallowed on instances of Stateless Function components