diff --git a/types/react/index.d.ts b/types/react/index.d.ts index c38f57b0a7..96c23cded3 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for React 16.1 +// Type definitions for React 16.3 // Project: http://facebook.github.io/react/ // Definitions by: Asana // AssureSign @@ -16,6 +16,7 @@ // Josh Rutherford // Guilherme Hübner // Josh Goldberg +// Johann Rakotoharisoa // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.6 @@ -268,6 +269,7 @@ declare namespace React { const Children: ReactChildren; const Fragment: ComponentType; + const StrictMode: ComponentType; const version: string; // diff --git a/types/react/test/tsx.tsx b/types/react/test/tsx.tsx index 7fa151fd29..a9ce5138de 100644 --- a/types/react/test/tsx.tsx +++ b/types/react/test/tsx.tsx @@ -89,6 +89,13 @@ const StatelessComponentWithoutProps: React.SFC = (props) => { ; +// Strict Mode +
+ +
+ +
; + // Below tests that setState() works properly for both regular and callback modes class SetStateTest extends React.Component<{}, { foo: boolean, bar: boolean }> { handleSomething = () => {