Skip to content

Commit 2cbfedc

Browse files
committed
Working on linkFiber & timeJump
1 parent d25ae85 commit 2cbfedc

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/backend/linkFiber.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,8 @@ function createTree(
352352
console.log('LinkFiber', {
353353
tag,
354354
elementType:
355-
elementType?._context?.displayName ||
355+
elementType?._context?.displayName || //For ContextProvider
356+
elementType?._result?.name || //For lazy Component
356357
elementType?.render?.name ||
357358
elementType?.name ||
358359
elementType,

src/backend/timeJump.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default (mode) => {
3636
// if yes, find the component by its index and assign it to a variable
3737
// call that components setState method to reset state to the state at the time of the jump snapshot
3838
if (component && component.setState) {
39-
console.log('timeJumps', { component });
39+
// console.log('timeJumps', { component });
4040
component.setState(
4141
// prevState contains the states of the snapshots we are jumping FROM, not jumping TO
4242
(prevState) => {
@@ -73,6 +73,7 @@ export default (mode) => {
7373
counter += 1;
7474
}
7575
const hooksComponent = componentActionsRecord.getComponentByIndexHooks(numArr);
76+
console.log('timeJumps', { hooksComponent, currState });
7677
for (let i = 0; i < currState.length; i += 1) {
7778
hooksComponent[i].dispatch(Object.values(currState[i])[0]);
7879
}

0 commit comments

Comments
 (0)