@@ -90,12 +90,10 @@ function sendSnapshot(snap: Snapshot, mode: Mode): void {
9090 if ( mode . jumping || mode . paused ) return ;
9191 // If there is no current tree creates a new one
9292 if ( ! snap . tree ) {
93- // console.log('in sendSnapshot');
9493 snap . tree = new Tree ( 'root' , 'root' ) ;
9594 }
96- // console.log('cleantreecopy', snap);
9795 const payload = snap . tree . cleanTreeCopy ( ) ;
98- // if it's Recoil - run different actions?
96+ // if it's Recoil - run different actions
9997 if ( isRecoil ) {
10098 // getRecoilState()
10199 payload . atomsComponents = atomsComponents ;
@@ -261,7 +259,6 @@ function createTree(
261259// check to see if we can get the information we were looking for
262260 if ( tag === 5 ) {
263261 try {
264- // console.log(elementType.toString());
265262 if ( memoizedProps . children [ 0 ] . _owner . memoizedProps !== undefined ) {
266263 const propsData = memoizedProps . children [ 0 ] . _owner . memoizedProps ;
267264 const newPropData = convertDataToString ( propsData , tree . componentData . props ? tree . componentData . props : null ) ;
@@ -271,7 +268,6 @@ function createTree(
271268 } ;
272269 }
273270 } catch ( error ) {
274- // console.log('this is the error', error);
275271 }
276272 }
277273
@@ -390,15 +386,13 @@ function createTree(
390386 && ( tag === 0 || tag === 1 || tag === 2 || tag === 10 )
391387 && isRecoil === false
392388 ) {
393- // console.log('memoizedState', memoizedState);
394389 if ( memoizedState . queue ) {
395390 // Hooks states are stored as a linked list using memoizedState.next,
396391 // so we must traverse through the list and get the states.
397392 // We then store them along with the corresponding memoizedState.queue,
398393 // which includes the dispatch() function we use to change their state.
399394 const hooksStates = traverseHooks ( memoizedState ) ;
400395 const hooksNames = getHooksNames ( elementType . toString ( ) ) ;
401- // console.log('hooksNames', hooksNames);
402396
403397 hooksStates . forEach ( ( state , i ) => {
404398 hooksIndex = componentActionsRecord . saveNew (
@@ -407,7 +401,6 @@ function createTree(
407401 ) ;
408402 // why is this re-writing componentData.hooksIndex every time? instead, should remove from loop and try to re-write it to be whichever state is being updated
409403 componentData . hooksIndex = hooksIndex ;
410- // console.log('componentData.hooksIndex inside loop', componentData.hooksIndex);
411404 if ( ! newState ) {
412405 newState = { hooksState : [ ] } ;
413406 // }
@@ -416,12 +409,8 @@ function createTree(
416409 }
417410 // newState[hooksNames[i]] = state.state;
418411 newState . hooksState . push ( { [ hooksNames [ i ] ] : state . state } ) ;
419- // console.log('newState.hooksState', newState.hooksState);
420412 componentFound = true ;
421413 } ) ;
422- // console.log('componentData.hooksIndex after', componentData.hooksIndex);
423- // console.log('hooksStates', hooksStates);
424- // console.log('hooksNames', hooksNames);
425414 }
426415 }
427416
@@ -498,7 +487,6 @@ function createTree(
498487 }
499488 // checking if tree fromSibling is true
500489 if ( fromSibling ) {
501- // console.log('stateinfromSibling', newState);
502490 newNode = tree . addSibling (
503491 newState ,
504492 elementType ? elementType . name : 'nameless' ,
@@ -551,13 +539,9 @@ export default (snap: Snapshot, mode: Mode): (() => void) => {
551539 return ( ) => {
552540 // react devtools global hook is a global object that was injected by the React Devtools content script, allows access to fiber nodes and react version
553541 const devTools = window . __REACT_DEVTOOLS_GLOBAL_HOOK__ ;
554- // console.log('devTools', devTools);
555542 const reactInstance = devTools ? devTools . renderers . get ( 1 ) : null ;
556- // console.log('reactInstance', reactInstance);
557543 // reactInstance returns an object of the react
558544 fiberRoot = devTools . getFiberRoots ( 1 ) . values ( ) . next ( ) . value ;
559- // console.log('fiberRoot', fiberRoot);
560- // console.log('snap', snap);
561545 const throttledUpdateSnapshot = throttle (
562546 ( ) => {
563547 updateSnapShotTree ( snap , mode ) ;
0 commit comments