We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 608c5da + 7942d26 commit 03829b1Copy full SHA for 03829b1
src/reactHotLoader.js
@@ -76,10 +76,18 @@ const reactHotLoader = {
76
registerComponent(type)
77
}
78
if (isContextType({ type })) {
79
+ // possible options - Context, Consumer, Provider.
80
+ ;['Provider', 'Consumer'].forEach(prop => {
81
+ const descriptor = Object.getOwnPropertyDescriptor(type, prop)
82
+ if (descriptor && descriptor.value) {
83
+ updateFunctionProxyById(
84
+ `${id}:${prop}`,
85
+ descriptor.value,
86
+ updateContext,
87
+ )
88
+ }
89
+ })
90
updateFunctionProxyById(id, type, updateContext)
- if (type.Provider) {
- updateFunctionProxyById(`${id}:provider`, type.Provider, updateContext)
- }
91
incrementGeneration()
92
93
if (isLazyType({ type })) {
0 commit comments