Skip to content

Commit e64a870

Browse files
(add) added seperation of react components to match with the components being rendered in ComponentMap
Co-authored-by: Alex Landeros <[email protected]>
1 parent e1337ae commit e64a870

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/backend/linkFiber.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,14 @@ function createTree(
184184

185185
if (!currentFiber) return null;
186186
if (!tree) return tree;
187-
187+
console.log(currentFiber);
188188
if (currentFiber.tag === 0 || currentFiber.tag === 1 || currentFiber.tag === 2) {
189189
if (currentFiber.child && currentFiber.child.stateNode) {
190190
console.log(currentFiber.child.stateNode);
191-
currentFiber.child.stateNode.setAttribute("id", "fromLinkFiber" + rtidCounter);
191+
rtid = "fromLinkFiber" + rtidCounter
192+
// if (currentFiber.child.stateNode.setAttribute) {
193+
currentFiber.child.stateNode.setAttribute("id", rtid);
194+
// }
192195
}
193196
rtidCounter++;
194197
}
@@ -370,13 +373,15 @@ function createTree(
370373
// We want to add this fiber node to the snapshot
371374
if (componentFound || newState === 'stateless') {
372375
if (fromSibling) {
376+
console.log(rtid)
373377
newNode = tree.addSibling(
374378
newState,
375379
elementType ? elementType.name : 'nameless',
376380
componentData,
377381
rtid
378382
);
379383
} else {
384+
console.log(rtid)
380385
newNode = tree.addChild(
381386
newState,
382387
elementType ? elementType.name : 'nameless',

0 commit comments

Comments
 (0)