You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
elementType?._context?.displayName||//For ContextProviders like Route, Navigation, Location
68
+
(elementType?._context&&'ContextProvider')||//Mark's note: useContext providers weren't showing up the way listed in the line above, I actually couldn't find the name of the context provider on the react dev tools fiber tree.
@@ -152,7 +174,7 @@ export default function createTree(currentFiberNode: Fiber): Tree {
152
174
// // }
153
175
// }
154
176
// // if user uses useContext hook, context data will be stored in memoizedProps.value of the Context.Provider component => grab context object stored in memoizedprops
155
-
// // Different from other provider, such as Routes, BrowswerRouter, ReactRedux, ..., Context.Provider does not have a displayName
177
+
// // Different from other provider, such as Routes, BrowserRouter, ReactRedux, ..., Context.Provider does not have a displayName
156
178
// // TODO: need to render this context provider when user use useContext hook.
157
179
// if (tag === ContextProvider && !elementType._context.displayName) {
158
180
// let stateData = memoizedProps.value;
@@ -182,9 +204,14 @@ export default function createTree(currentFiberNode: Fiber): Tree {
182
204
// Example: for Stateful buttons demo-app: Increment is a stateful component that use useState hook to store state data.
183
205
if(
184
206
(tag===FunctionComponent||
185
-
tag===IndeterminateComponent||
186
-
//TODO: Need reasoning for why we evaluate context provider
187
-
tag===ContextProvider)&&
207
+
tag===IndeterminateComponent||
208
+
//TODO: Need reasoning for why we evaluate context provider
209
+
/**
210
+
* So far I haven't seen a case where hook data is stored for ContextProviders in memoized state. So far
211
+
* I've seen some data a non-null memoize state on browser router, but queue is null. Routes has some good info on memoized props,
212
+
* but that's not being addressed here. useContext providers also have null for memoized state.
0 commit comments