admin管理员组

文章数量:1193346

i try to new dom components at Expo 52 in this article /guides/dom-components/

'use dom';

export default function DOMComponent({}: { dom: import('expo/dom').DOMProps }) {
  return (
    <div>
      <h1>Hello, world!</h1>
    </div>
  );
}

import DOMComponent from './my-component';

export default function App() {
  return (
    <DOMComponent
      dom={{
        scrollEnabled: false,
      }}
    />
  );
}

but dom components props not work i mean the DOMComponent can scroll still

DomProps seesm like not work yet. By the way i created the project by this command

npx create-expo-app@latest

this project include SDK 52 and new arc true

i try to new dom components at Expo 52 in this article https://docs.expo.dev/guides/dom-components/

'use dom';

export default function DOMComponent({}: { dom: import('expo/dom').DOMProps }) {
  return (
    <div>
      <h1>Hello, world!</h1>
    </div>
  );
}

import DOMComponent from './my-component';

export default function App() {
  return (
    <DOMComponent
      dom={{
        scrollEnabled: false,
      }}
    />
  );
}

but dom components props not work i mean the DOMComponent can scroll still

DomProps seesm like not work yet. By the way i created the project by this command

npx create-expo-app@latest

this project include SDK 52 and new arc true

Share Improve this question asked Jan 23 at 16:13 BerkooBerkoo 651 silver badge6 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Did you try with any other props? I can't see anything wrong. I do it the same way, but with injectedJavaScript and onMessage, and it works fine. Note that scrollEnabled only works on iOS and macOS (in case you're testing on Android)

本文标签: react nativeExpo 52 Version Dom Components Props Not WorkStack Overflow