React Native Web

The registration form demo written with React Native Web, self-contained:

  • form.tsx: setupForm (with a renderRoot for the title and layout) and the config. props use React Native Web's own API, typed by its components.

  • fields.tsx: the adapters, typed with React Native Web's own props through AdapterProps.

  • main.tsx: mounts it in the demo stage (header, payload drawer).

  • There is no <form>: renderRoot renders a View and its Button calls onSubmit(); the header button calls it too.

  • TextInput reports text with onChangeText; the select is a row of Pressable options; the checkbox is a Switch.

  • On the web, alias react-native to react-native-web in the bundler (see the demos' vite.config.ts).

Tip

main.tsx only mounts the docs' demo stage (language switch, payload drawer); your app renders Form itself. See Connect your UI kit.

Live demo
form.tsx
fields.tsx
main.tsx