You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 523166b
Browse filesBrowse the repository at this point in the historyBrowse files
`@expo/html-elements` doesn't work with the package. It imports internal files of react-native-web's `View`, which the package doesn't have, so the bundle fails. Give `View` and `Text` a `role` instead: see [Semantic HTML](/semantic-html).
83
83
84
-
## Names that aren't there yet
84
+
## Names that load as stubs
85
85
86
-
A name of `react-native` that `@rootnative/web` doesn't have yet loads as a stub. The import works, so a library that imports the name and doesn't use it still loads. A use throws an error that names it, such as `ImageBackground is not in @rootnative/web yet`.
86
+
A name that Expo's bundler asks for and `@rootnative/web` doesn't have loads as a stub. The import works, so a library that imports the name and doesn't use it still loads. A use throws an error that names it, such as `Picker is not in @rootnative/web yet`.
87
87
88
-
The largest ones today are `SafeAreaView`and `InputAccessoryView`. The file `expo-exports.json` of the package lists all of them under `missing`: `node_modules/@rootnative/web-expo/expo-exports.json`, or `node_modules/react-native-web/expo-exports.json` with the alias.
88
+
These names aren't in React Native 0.88: `CheckBox`, `Picker`, `ProgressBar`, and the others come from react-native-web, and React Native removed `InteractionManager`. The file `expo-exports.json` of the package lists all of them under `missing`: `node_modules/@rootnative/web-expo/expo-exports.json`, or `node_modules/react-native-web/expo-exports.json` with the alias.
description: InputAccessoryView on the web. It renders nothing, as on Android.
5
+
---
6
+
7
+
# `InputAccessoryView`
8
+
9
+
On iOS, a view that shows above the keyboard of a text field. React Native has it on iOS only. On the web, as on Android, it renders nothing, and in development the first render warns once: `<InputAccessoryView> is only supported on iOS.`
10
+
11
+
The import works, so code for iOS that renders it still runs on the web. For a bar above the keyboard on the web, put a view at the bottom of a [`KeyboardAvoidingView`](/keyboardavoidingview).
description: SafeAreaView on the web. A View with padding from the safe-area insets of the browser. Deprecated, as in React Native.
5
+
---
6
+
7
+
# `SafeAreaView`
8
+
9
+
:::warning Deprecated
10
+
React Native deprecates `SafeAreaView`, and so does this package. Use `react-native-safe-area-context`, which works on the web too. In development, the first render warns once, as React Native does.
11
+
:::
12
+
13
+
A [`View`](/view) with padding that keeps its content out of the notch and the home bar, as on iOS.
14
+
15
+
```tsx
16
+
import { SafeAreaView, Text } from'react-native'
17
+
18
+
exportfunction Screen() {
19
+
return (
20
+
<SafeAreaViewstyle={{ flex: 1 }}>
21
+
<Text>Content</Text>
22
+
</SafeAreaView>
23
+
)
24
+
}
25
+
```
26
+
27
+
The padding is the safe-area inset of the browser on each side: `env(safe-area-inset-top)` and the others. A phone browser has insets only for a page with `viewport-fit=cover` in its viewport tag:
| Compat |[`unstable_createElement`](/compat), [`findNodeHandle`](/compat), [`TurboModuleRegistry`](/compat), and the entries `@rootnative/web/assets-registry` and `@rootnative/web/style`. Libraries import them, your app doesn't. Also the react-native-web props [`hrefAttrs` and `dataSet`](/compat#props-from-react-native-web), which libraries send. |
20
-
| Web layer |[`Head`](/seo), from `@rootnative/web/dom`|
21
-
| Tooling |[`rootnative()`](/vite-plugin), the Vite plugin, from `@rootnative/web/vite`, and [`@rootnative/web-expo`](/expo), for an Expo app, also with Expo Router |
| Compat |[`unstable_createElement`](/compat), [`findNodeHandle`](/compat), [`TurboModuleRegistry`](/compat), and the entries `@rootnative/web/assets-registry` and `@rootnative/web/style`. Libraries import them, your app doesn't. Also the react-native-web props [`hrefAttrs` and `dataSet`](/compat#props-from-react-native-web), which libraries send. |
20
+
| Web layer |[`Head`](/seo), from `@rootnative/web/dom`|
21
+
| Tooling |[`rootnative()`](/vite-plugin), the Vite plugin, from `@rootnative/web/vite`, and [`@rootnative/web-expo`](/expo), for an Expo app, also with Expo Router |
0 commit comments