From 07bf2ebb10120f1e95ba459fd034e497c7ffe38a Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Thu, 24 Oct 2019 19:21:31 +0200 Subject: [PATCH] chore(react): Add comment about createContext defaultValue (#39389) --- types/react/index.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/react/index.d.ts b/types/react/index.d.ts index 33680abf81..f8374a5018 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -338,6 +338,8 @@ declare namespace React { displayName?: string; } function createContext( + // If you thought this should be optional, see + // https://github.com/DefinitelyTyped/DefinitelyTyped/pull/24509#issuecomment-382213106 defaultValue: T, calculateChangedBits?: (prev: T, next: T) => number ): Context;