Skip to content

Commit efcb3ee

Browse files
committed
fixed newState error that added wrong state key
1 parent f016269 commit efcb3ee

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

dev-reactime/linkFiber.js

Lines changed: 1 addition & 14 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
@@ -233,7 +221,6 @@ module.exports = (snap, mode) => {
233221

234222
// ! BUG: skips 1st hook click
235223
function updateSnapShotTree() {
236-
<<<<<<< HEAD
237224
/* let current;
238225
// If concurrent mode, grab current.child
239226
if (concurrent) {

0 commit comments

Comments
 (0)