Skip to content

Commit cab5050

Browse files
committed
feat(react-native): access DOMNode directly from ref in React 19
1 parent b2b79ee commit cab5050

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/sdks/overrides/react-native/src/functions/transform-block-properties.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ export function transformBlockProperties({
2222

2323
properties.ref = (ref) => {
2424
if (isEditing()) {
25-
const el = findDOMNode(ref);
25+
// findDOMNode has been removed in React 19
26+
const el = findDOMNode ? findDOMNode(ref) : ref;
2627
if (el && !(el instanceof Text)) {
2728
el.setAttribute('builder-id', id);
2829
el.classList.add(id);

0 commit comments

Comments
 (0)