Skip to content

Commit af641b0

Browse files
authored
Add Debug Tools Package for Introspection of Hooks (#14085)
* Add debug tools package * Add basic implementation * Implement inspection of the current state of hooks using the fiber tree * Support useContext hooks inspection by backtracking from the Fiber I'm not sure this is safe because the return fibers may not be current but close enough and it's fast. We use this to set up the current values of the providers. * rm copypasta * Use lastIndexOf Just in case. I don't know of any scenario where this can happen. * Support ForwardRef * Add test for memo and custom hooks * Support defaultProps resolution
1 parent 49f6fc8 commit af641b0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/ReactTestRenderer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ const validWrapperTypes = new Set([
211211
HostComponent,
212212
ForwardRef,
213213
MemoComponent,
214+
SimpleMemoComponent,
214215
// Normally skipped, but used when there's more than one root child.
215216
HostRoot,
216217
]);

0 commit comments

Comments
 (0)