@@ -35,6 +35,8 @@ const circularComponentTable = new Set();
35
35
let isRecoil = false ;
36
36
let allAtomsRelationship = [ ] ;
37
37
let initialstart = false ;
38
+ let rtidCounter = 0 ;
39
+ let rtid = null ;
38
40
39
41
// Simple check for whether our target app uses Recoil
40
42
if ( window [ `$recoilDebugStates` ] ) {
@@ -182,7 +184,12 @@ function createTree(
182
184
183
185
if ( ! currentFiber ) return null ;
184
186
if ( ! tree ) return tree ;
187
+
185
188
189
+ console . log ( 'currentFiber' , currentFiber ) ;
190
+ rtid = `fromLinkFiber${ rtidCounter } `
191
+ rtidCounter ++
192
+
186
193
// These have the newest state. We update state and then
187
194
// called updateSnapshotTree()
188
195
@@ -200,6 +207,7 @@ function createTree(
200
207
treeBaseDuration,
201
208
} = currentFiber ;
202
209
210
+
203
211
//Checks Recoil Atom and Selector Relationships
204
212
if (
205
213
currentFiber . memoizedState &&
@@ -362,13 +370,15 @@ function createTree(
362
370
newNode = tree . addSibling (
363
371
newState ,
364
372
elementType ? elementType . name : 'nameless' ,
365
- componentData
373
+ componentData ,
374
+ rtid
366
375
) ;
367
376
} else {
368
377
newNode = tree . addChild (
369
378
newState ,
370
379
elementType ? elementType . name : 'nameless' ,
371
- componentData
380
+ componentData ,
381
+ rtid
372
382
) ;
373
383
}
374
384
} else {
@@ -388,7 +398,6 @@ function createTree(
388
398
circularComponentTable . add ( sibling ) ;
389
399
createTree ( sibling , newNode , true ) ;
390
400
}
391
-
392
401
return tree ;
393
402
}
394
403
0 commit comments