Skip to content

Commit 6719331

Browse files
committed
whatever
2 parents 1c54a2f + 0360ec1 commit 6719331

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

dev-reactime/linkFiber.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ module.exports = (snap, mode) => {
121121
// Save component's state and setState() function to our record for future
122122
// time-travel state changing. Add record index to snapshot so we can retrieve.
123123
componentData.index = componentActionsRecord.saveNew(stateNode.state, stateNode);
124-
newState.state = stateNode.state;
124+
newState = stateNode.state;
125125
componentFound = true;
126126
}
127127

@@ -148,18 +148,6 @@ module.exports = (snap, mode) => {
148148
componentFound = true;
149149
});
150150
}
151-
} else {
152-
console.log('in create tree else');
153-
console.log('this is currentFiber from createTree', currentFiber);
154-
console.log('this is memoizedState from createTree', memoizedState);
155-
// grab stateless components here
156-
if (elementType) {
157-
if (elementType.name) {
158-
tree.appendChild('stateless', elementType.name, index);
159-
} else {
160-
tree.appendChild('stateless', elementType, index);
161-
}
162-
}
163151
}
164152

165153
// This grabs stateless components

dev-reactime/tree.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class Tree {
4444
});
4545
}
4646
return copy;
47+
}
4748

4849
// print out the tree structure in the console
4950
// DEV: Process may be different for useState components
@@ -53,7 +54,8 @@ class Tree {
5354
// console.log('current tree structure for *this : ', this);
5455
const children = ['children: '];
5556
// DEV: What should we push instead for components using hooks (it wouldn't be state)
56-
this.children.forEach(child => { // if this.children is always initialized to empty array, when would there ever be anything to iterate through here?
57+
// if this.children is always initialized to empty array, when would there ever be anything to iterate through here?
58+
this.children.forEach(child => {
5759
children.push(child.state || child.component.state);
5860
});
5961
if (this.name) console.log('this.name if exists: ', this.name);
@@ -66,4 +68,4 @@ class Tree {
6668
}
6769
}
6870

69-
module.exports = Tree
71+
module.exports = Tree;

0 commit comments

Comments
 (0)