We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
context
1 parent 9207eeb commit 282aa18Copy full SHA for 282aa18
types/react/index.d.ts
@@ -417,6 +417,7 @@ declare namespace React {
417
/**
418
* If using the new style context, re-declare this in your class to be the
419
* `React.ContextType` of your `static contextType`.
420
+ * Should be used with type annotation or static contextType.
421
*
422
* ```ts
423
* static contextType = MyContext
@@ -426,8 +427,7 @@ declare namespace React {
426
427
* declare context: React.ContextType<typeof MyContext>
428
* ```
429
- * @deprecated if used without a type annotation, or without static contextType
430
- * @see https://reactjs.org/docs/legacy-context.html
+ * @see https://reactjs.org/docs/context.html
431
*/
432
// TODO (TypeScript 3.0): unknown
433
context: any;
0 commit comments