# React Native

MuxForms on React Native and Expo means POSTing JSON from your existing inputs to the submit API. There is no native SDK—map field names to the schema and include the ingest secret on production traffic. Submissions share the inbox with website embeds.

## Mobile submit

| Topic | Guidance |
| --- | --- |
| UI | Your native components |
| Transport | fetch POST JSON |
| Auth | Per-form ingest secret |
| CORS | Not used on native |

## Submit from React Native

```
const FORM_ID = "FORM_UUID";
const INGEST_SECRET = process.env.EXPO_PUBLIC_MUXFORMS_INGEST_SECRET; // proxy via your API in prod

export async function submitContact(email: string, message: string) {
  const res = await fetch(`https://www.muxforms.com/api/v1/forms/${FORM_ID}/submit`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      Authorization: `Bearer ${INGEST_SECRET}`,
    },
    body: JSON.stringify({ email, message, platform: "ios", _hp: "" }),
  });
  if (res.status === 422) {
    const err = await res.json();
    throw err;
  }
  if (!res.ok) throw new Error("Submit failed");
}
```

## Security note

Do not ship production ingest secrets in client binaries when avoidable—POST from your backend or Expo API route with the secret in environment variables.

## FAQ

### Can I use the same form id as the website?

Yes—that is how you unify app and web feedback in one inbox.

### How do I handle validation errors?

Read 422 responses and show field errors in your UI.

### Do I need embed.js in the app?

No. embed.js is for websites only.

### Is there an example article?

See the Expo + website inbox post on the MuxForms blog.

---

HTML version: https://www.muxforms.com/docs/react-native
Source: MuxForms (https://www.muxforms.com)
