@@ -60,13 +60,8 @@ const circularComponentTable = new Set();
60
60
let allAtomsRelationship = [ ] ;
61
61
62
62
function getRecoilState ( ) : any {
63
- // get the last state snapshot
64
63
const RecoilSnapshotsLength = window [ `$recoilDebugStates` ] . length ;
65
64
const lastRecoilSnapshot = window [ `$recoilDebugStates` ] [ RecoilSnapshotsLength - 1 ] ;
66
- console . log ( lastRecoilSnapshot ) ;
67
-
68
- // get all atom - selector pairs, and save them as nodes
69
- // in the from to weight format
70
65
const nodeToNodeSubs = lastRecoilSnapshot . nodeToNodeSubscriptions ;
71
66
let nodeToNodeSubsKeys = lastRecoilSnapshot . nodeToNodeSubscriptions . keys ( ) ;
72
67
nodeToNodeSubsKeys . forEach (
@@ -76,21 +71,6 @@ function getRecoilState() : any {
76
71
)
77
72
}
78
73
)
79
-
80
- // get all atom - component pairs, and save them as nodes
81
- // in the from to weight format
82
-
83
- // const nodeToCompSubs = lastRecoilSnapshot.nodeToComponentSubscriptions;
84
- // console.log(nodeToCompSubs);
85
- // let nodeToCompSubsKeys = lastRecoilSnapshot.nodeToComponentSubscriptions.keys();
86
- // nodeToCompSubsKeys.forEach(
87
- // node => {
88
- // console.log(node);
89
- // // nodeToCompSubsKeys.get(node).forEach(
90
- // // nodeSubs => allAtomsRelationship.push([node, nodeSubs, 2])
91
- // // )
92
- // }
93
- // )
94
74
}
95
75
96
76
@@ -399,18 +379,7 @@ export default (snap: Snapshot, mode: Mode): (() => void) => {
399
379
}
400
380
401
381
return ( ) => {
402
- /* const container = document.getElementById('root');
403
- if (container._internalRoot) {
404
- fiberRoot = container._internalRoot;
405
- } else {
406
- const {
407
- _reactRootContainer: { _internalRoot },
408
- _reactRootContainer,
409
- } = container;
410
- // Only assign internal root if it actually exists
411
- fiberRoot = _internalRoot || _reactRootContainer;
412
- }
413
- */
382
+
414
383
const devTools = window . __REACT_DEVTOOLS_GLOBAL_HOOK__ ;
415
384
const reactInstance = devTools ? devTools . renderers . get ( 1 ) : null ;
416
385
fiberRoot = devTools . getFiberRoots ( 1 ) . values ( ) . next ( ) . value ;
0 commit comments