Atlas Device SDK para React Native
Utiliza Atlas Device SDK para React Native a fin de desarrollar apps para iOS y Android con JavaScript o TypeScript.
Get Started with Realm React Native
Inicio rápido
Minimal-explanation code examples of how to work with the SDK. Write to the device database, and sync with other devices.
Working Example App
Aprende con el ejemplo, diseccionando una aplicación cliente funcional de React Native que utiliza el React Native SDK.
Tutorial guiado
Sigue un tutorial guiado para aprender a adaptar la aplicación de ejemplo y así crear tu propia aplicación funcional.
Desarrollar aplicaciones con el SDK
Use the SDK's open-source database - Realm - to store data on a device. Use Device Sync to keep data in sync with your MongoDB Atlas cluster and other clients.
Instalar el SDK de React Native
Set up your project with React Native and the SDK. To get started, install the React Native SDK.
Define an Object Schema
Use JavaScript to idiomatically define an object schema.
Configurar y abrir una base de datos
Puede configurar su base de datos para que complete los datos iniciales al cargarlos, use una clave de cifrado para protegerlos, etc. Para empezar a trabajar con sus datos, configure y abra una base de datos.
Lectura y escritura de datos
You can create, read, update, and delete objects from the device database. Construct complex queries to filter data.
React to Changes
Live objects mean that your data is always up-to-date. Register a change listener to react to changes and perform logic like updating your UI.
_Spot.webp)
Connect to an Atlas App Services App
Configure Device Sync in an App Services App. Define data access rules or use Development Mode to infer a schema from your client's data model. Then, connect to the backend App from your React Native App.
Authenticate a User
App Services provides access to custom JWT authentication, our built-in email/password provider, anonymous authentication, and popular authentication providers like Apple, Google, and Facebook. Use these providers to authenticate a user in your client.
Abrir una base de datos sincronizada
Para comenzar a sincronizar datos, abre una base de datos sincronizada. Para determinar qué datos puede leer y escribir una base de datos sincronizada, suscribirse a una query.
Leer y guardar datos sincronizados
The APIs for reading and writing data are the same for both synced and non-synced databases. Data that you read and write to the device is automatically kept in sync with your Atlas cluster and other clients. Apps keep working offline and sync changes when a network connection is available.
_Spot.webp)
Usa Atlas App Services en tu aplicación React Native con el SDK de Realm.
Call Serverless Functions
Para invocar la lógica backend sin servidor desde tu cliente React Native, llama a Atlas Functions.
Consulta de MongoDB Atlas
Query data stored in MongoDB directly from your client application code with MongoDB Data Access.
Authenticate Users
Autentique a los usuarios con proveedores de autenticación incorporados y de terceros. Acceda a Servicios de aplicación con usuarios autenticados.

@realm/react is an npm package that provides an easy-to-use API to perform common SDK operations in your React Native app, such as querying or writing to a database and listening for changes to objects. @realm/react includes React context, providers, and hooks for working with the SDK.
Use @realm/react to manage the database, Atlas App Services, and Atlas Device Sync.

Lectura Recomendada
Referencia de la API de JavaScript
Explore generated reference docs for the React Native SDK.
Guía de inicio rápido de React Native con Expo
Build and deploy a React Native application quickly using an Expo template application with @realm/react.
Example Projects
Explore engineering and expert-provided example projects to learn best practices and common development patterns using the React Native SDK. Check out the Example Projects page for more React Native sample apps.
Aplicación de películas similar a Netflix
Build a Netflix-like app for browsing movies from MongoDB's Mflix sample dataset. Use multiple databases to allow users to sync and manage movies in their own private lists.
Offline Login and Database Access
Log in a Device Sync user and open a synced database offline.
Connection State Change & Error Handling
Conozca las mejores prácticas sobre el manejo de errores de sincronización y estrategias de restablecimiento de clientes.