Skip to content

Conversation

rubennorte
Copy link
Contributor

This adds the initial documentation for the new Web DOM APIs in React Native, that will be shipped as stable in React Native v0.82.

Copy link

netlify bot commented Sep 9, 2025

Deploy Preview for react-native ready!

Name Link
🔨 Latest commit 5982a37
🔍 Latest deploy log https://app.netlify.com/projects/react-native/deploys/68c03e3d63624a00086c199a
😎 Deploy Preview https://deploy-preview-4783--react-native.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

netlify bot commented Sep 9, 2025

Deploy Preview for react-native ready!

Name Link
🔨 Latest commit 2db9536
🔍 Latest deploy log https://app.netlify.com/projects/react-native/deploys/68c291625ba2630008358f7a
😎 Deploy Preview https://deploy-preview-4783--react-native.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

export default ViewWithRefs;
```

Note that some built-in components are only a container for other components (including native components). For example, `ScrollView` internally renders a native scroll view and a native view, which are accessible through the ref is provides using methods like `getNativeScrollRef()` and `getInnerViewRef()`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which are accessible through the ref is provides using methods like getNativeScrollRef() and getInnerViewRef().

There is something wrong in this sentence

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

through the ref it provides...

Will fix :)


export default ViewWithRefs;
```

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you put the box below inside an :::info box?

- [`offsetWidth`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetWidth)
- Methods
- [`blur()`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/blur).
- ℹ️ This method was also [available](/docs/next/legacy/direct-manipulation#blur) in the legacy architecture.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this is worth mentioning anymore

docs/nodes.md Outdated
- [Text](/docs/next/text-nodes): text nodes represent raw text content on the tree (similar to [`Text`](https://developer.mozilla.org/en-US/docs/Web/API/Text) nodes on Web). They are not directly accessible via `refs`, but can be accessed using methods like [`childNodes`](https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes) on element refs.
- [Documents](/docs/next/document-nodes): document nodes represent a complete native view tree (similar to [`Document`](https://developer.mozilla.org/en-US/docs/Web/API/Document) nodes on Web). Like text nodes, they can only be accessed through other nodes, using properties like [`ownerDocument`](https://developer.mozilla.org/en-US/docs/Web/API/Node/ownerDocument).

As on Web, these nodes can be used to traverse the rendered UI tree, access layout information or execute imperative operations like `focus`. **Unlike on Web, they do not allow mutation** (e.g.: [`node.appendChild`](https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild)), as the tree contents are fully managed by the React renderer.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unlike on Web, they do not allow mutation

Can you put this in a separate line + add it in a admonition box (like a :::warning one or so)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, but will use info instead of warning. We're already explaining the methods we support, and none of the mutating ones are even defined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants