@@ -63,12 +63,12 @@ function getRecoilState(): any {
63
63
function sendSnapshot ( snap : Snapshot , mode : Mode ) : void {
64
64
// Don't send messages while jumping or while paused
65
65
if ( mode . jumping || mode . paused ) return ;
66
-
67
66
if ( ! snap . tree ) {
68
67
snap . tree = new Tree ( 'root' , 'root' ) ;
69
68
}
70
-
69
+ // console.log('inside of inside of linkFiber.ts, before cleanTreeCopy(), snap:', snap);
71
70
const payload = snap . tree . cleanTreeCopy ( ) ;
71
+ // console.log('inside of linkFiber.ts, after cleanTreeCopy() payload:', payload);
72
72
if ( isRecoil ) {
73
73
getRecoilState ( ) ;
74
74
payload . AtomsRelationship = allAtomsRelationship ;
@@ -96,6 +96,7 @@ function updateSnapShotTree(snap: Snapshot, mode: Mode): void {
96
96
circularComponentTable . clear ( ) ;
97
97
snap . tree = createTree ( current ) ;
98
98
}
99
+ console . log ( 'SNAP.TREE:' , snap . tree )
99
100
sendSnapshot ( snap , mode ) ;
100
101
}
101
102
@@ -171,7 +172,7 @@ function createTree(
171
172
) {
172
173
// Base case: child or sibling pointed to null
173
174
// if (currentFiber.tag === 5) {
174
- // console.log(currentFiber.stateNode )
175
+ // console.log(currentFiber)
175
176
// }
176
177
177
178
if ( ! currentFiber ) return null ;
@@ -230,6 +231,7 @@ function createTree(
230
231
stateNode . state ,
231
232
stateNode
232
233
) ;
234
+
233
235
// console.log(componentData)
234
236
// console.log('stateNode inside of line 232:', stateNode)
235
237
newState = stateNode . state ;
@@ -325,6 +327,7 @@ function createTree(
325
327
let newNode = null ;
326
328
// We want to add this fiber node to the snapshot
327
329
if ( componentFound || newState === 'stateless' ) {
330
+ console . log ( 'INSIDE LINKFIBER, CURRENTFIBER:' , currentFiber ) ;
328
331
if ( fromSibling ) {
329
332
newNode = tree . addSibling (
330
333
newState ,
@@ -341,17 +344,21 @@ function createTree(
341
344
} else {
342
345
newNode = tree ;
343
346
}
344
- console . log ( 'inside LinkFiber, circularComponentTable:' , circularComponentTable ) ;
347
+ // console.log('inside LinkFiber, circularComponentTable:', circularComponentTable);
345
348
// Recurse on children
346
349
if ( child && ! circularComponentTable . has ( child ) ) {
350
+ // if (currentFiber.tag === 5) console.log('inside recursive call in linkFiber', currentFiber);
347
351
// If this node had state we appended to the children array,
348
352
// so attach children to the newly appended child.
349
353
// Otherwise, attach children to this same node.
354
+
350
355
circularComponentTable . add ( child ) ;
356
+ // console.log(createTree(child, newNode))
351
357
createTree ( child , newNode ) ;
352
358
}
353
359
// Recurse on siblings
354
360
if ( sibling && ! circularComponentTable . has ( sibling ) ) {
361
+ // if (currentFiber.tag === 5) console.log('inside recursive call in linkFiber', currentFiber);
355
362
circularComponentTable . add ( sibling ) ;
356
363
createTree ( sibling , newNode , true ) ;
357
364
}
0 commit comments