Skip to content

Commit d95398f

Browse files
VNguyenCodeSanjayLavingiaguizzettic
committed
(modified) Modified logic to now include setting the attribute for non-recoil apps in the createTree function
Co-authored-by: Sanjay Lavingia <[email protected]> Co-authored-by: Chris Guizetti <[email protected]>
1 parent 52b9532 commit d95398f

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

src/app/components/ComponentMap.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,13 @@ export default function ComponentMap({
152152
forceUpdate();
153153
}}
154154
onMouseEnter={()=> {
155-
dispatch(onHover(node.data.recoilDomNode[node.data.name]))
155+
156+
if(node.data.recoilDomNode){
157+
dispatch(onHover(node.data.recoilDomNode[node.data.name]))
158+
} else {
159+
dispatch(onHover(rtid))
160+
}
161+
156162
}
157163
/>
158164
)}

src/backend/linkFiber.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,12 @@ function createTree(
398398

399399
pointer = pointer.child
400400
}
401+
} else {
402+
if (currentFiber.child && currentFiber.child.stateNode) {
403+
rtid = "fromLinkFiber" + rtidCounter
404+
currentFiber.child.stateNode.setAttribute("id", rtid);
405+
}
406+
rtidCounter++;
401407
}
402408

403409
newNode = tree.addSibling(
@@ -424,6 +430,12 @@ function createTree(
424430
}
425431
pointer = pointer.child
426432
}
433+
} else {
434+
if (currentFiber.child && currentFiber.child.stateNode) {
435+
rtid = "fromLinkFiber" + rtidCounter
436+
currentFiber.child.stateNode.setAttribute("id", rtid);
437+
}
438+
rtidCounter++;
427439
}
428440

429441
newNode = tree.addChild(

0 commit comments

Comments
 (0)