chore(react): Add comment about createContext defaultValue (#39389)

This commit is contained in:
Sebastian Silbermann
2019-10-24 10:21:31 -07:00
committed by Wesley Wigham
parent 42718dc2ab
commit 07bf2ebb10
+2
View File
@@ -338,6 +338,8 @@ declare namespace React {
displayName?: string;
}
function createContext<T>(
// 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<T>;