Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<!-- * Either mention core version or upgrade -->
<!-- * Using Realm Core vX.Y.Z -->
<!-- * Upgraded Realm Core from vX.Y.Z to vA.B.C -->
* Update URLs to documentation.

## 12.7.0 (2024-04-17)

Expand Down
6 changes: 3 additions & 3 deletions packages/babel-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ As a rule, we recommend using TypeScript types where possible, and using `Realm.

Types which are provided by Realm (e.g. `Realm.List`) are exported from both the top-level `Realm` namespace, and from `Realm.Types` - you can use either variant in your models.

The supported types are shown in the table below. See [the Realm documentation](https://www.mongodb.com/docs/realm/sdk/react-native/data-types/field-types/) and [SDK documentation](https://www.mongodb.com/docs/realm-sdks/js/latest/Realm.html#~PropertyType) for more details on each type.
The supported types are shown in the table below. See [the Realm documentation](https://www.mongodb.com/docs/atlas/device-sdks/sdk/react-native/model-data/data-types/property-types/) for more details on each type.

| Realm.Types type | Realm schema type | TypeScript type | Realm type | Notes |
| -------------------------------------------- | ----------------- | --------------- | ----------------------- | -------------------------------------------------------------------------------------- |
Expand All @@ -175,7 +175,7 @@ The supported types are shown in the table below. See [the Realm documentation](

### Specifying schema properties as `static`s

Additional schema properties can be specified by adding `static` properties to your class, as shown in the table below. See [the Realm documentation](https://www.mongodb.com/docs/realm/sdk/node/examples/define-a-realm-object-model/) for more details.
Additional schema properties can be specified by adding `static` properties to your class, as shown in the table below. See [the Realm documentation](https://www.mongodb.com/docs/atlas/device-sdks/sdk/react-native/model-data/define-a-realm-object-model/) for more details.

| Static property | Type | Notes |
| --------------- | --------- | -------------------------------------------------------------------------- |
Expand All @@ -200,7 +200,7 @@ export class Task extends Realm.Object<Task, "description"> {

### Using decorators to index and remap properties

The `@realm/babel-plugin` package exports decorators to allow you to specify certain properties should be indexed (using the `@index` decorators) or should remap to a Realm schema property with a different name (using the `@mapTo` decorator). To learn more about this functionality, see [the documentation](https://www.mongodb.com/docs/realm/sdk/react-native/examples/define-a-realm-object-model/#index-a-property).
The `@realm/babel-plugin` package exports decorators to allow you to specify certain properties should be indexed (using the `@index` decorators) or should remap to a Realm schema property with a different name (using the `@mapTo` decorator). To learn more about this functionality, see [the documentation](https://www.mongodb.com/docs/atlas/device-sdks/sdk/react-native/model-data/define-a-realm-object-model/#index-a-property).

Note that use of decorators requires using the `@babel/plugin-proposal-decorators` plugin and for `experimentalDecorators` to be enabled in your `tsconfig.json`. There is currently no way to specifying properties to be indexed or remapped without using decorators.

Expand Down
8 changes: 4 additions & 4 deletions packages/realm-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ For a full fledged example, check out [our templates](https://github.com/realm/r
## Realm Hooks

### useRealm
Returns the instance of the [`Realm`](https://www.mongodb.com/docs/realm-sdks/js/latest/Realm.html) configured by `createRealmContext` and the `RealmProvider`. The following is an example of how to use this Hook to make a write transaction callback for a component.
Returns the instance of the [`Realm`](https://www.mongodb.com/docs/realm-sdks/js/latest/classes/Realm.html) configured by `createRealmContext` and the `RealmProvider`. The following is an example of how to use this Hook to make a write transaction callback for a component.

```tsx
import {useRealm} from '@realm/react';
Expand All @@ -146,7 +146,7 @@ const Component = ({item}) => {

### useQuery

Returns [`Realm.Results`](https://www.mongodb.com/docs/realm-sdks/js/latest/Realm.Results.html) from a given type. This Hook will update on any changes to any Object in the Collection and return an empty array if the Collection is empty.
Returns [`Realm.Results`](https://www.mongodb.com/docs/realm-sdks/js/latest/classes/Realm.Results.html) from a given type. This Hook will update on any changes to any Object in the Collection and return an empty array if the Collection is empty.
Copy link
Contributor

Choose a reason for hiding this comment

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

This too is giving me a 403 Forbidden.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See above

The result of this can be consumed directly by the `data` argument of any React Native [`VirtualizedList`](https://reactnative.dev/docs/virtualizedlist) or [`FlatList`](https://reactnative.dev/docs/flatlist). If the component used for the list's `renderItem` prop is wrapped with [`React.Memo`](https://reactjs.org/docs/react-api.html#reactmemo), then only the modified object will re-render.

```tsx
Expand All @@ -171,7 +171,7 @@ const Component = () => {
```

### useObject
Returns a [`Realm.Object`](https://www.mongodb.com/docs/realm-sdks/js/latest/Realm.Object.html) for a given type and primary key. The Hook will update on any changes to the properties on the returned Object and return `null` if it either doesn't exist or has been deleted.
Returns a [`Realm.Object`](https://www.mongodb.com/docs/realm-sdks/js/latest/classes/Realm.Object.html) for a given type and primary key. The Hook will update on any changes to the properties on the returned Object and return `null` if it either doesn't exist or has been deleted.

```tsx
import {useObject} from '@realm/react';
Expand Down Expand Up @@ -341,7 +341,7 @@ const SomeComponent = () => {

### Authentication Hooks

The following hooks can be used to authenticate users in your application. They return authentication operations and a single result object which can be read to track the progress of the current result. More information about the specific auth methods can be found in the [Authenticate Users](https://www.mongodb.com/docs/realm/sdk/react-native/manage-users/authenticate-users) Documentation.
The following hooks can be used to authenticate users in your application. They return authentication operations and a single result object which can be read to track the progress of the current result. More information about the specific auth methods can be found in the [Authenticate Users](https://www.mongodb.com/docs/atlas/device-sdks/sdk/react-native/manage-users/authenticate-users) Documentation.

## `result`
The authentication hooks return a `result` has the following structure:
Expand Down
8 changes: 4 additions & 4 deletions packages/realm-web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Accessing Atlas App Services from a web-browser.

## Documentation

Visit https://docs.mongodb.com/realm/web/ for quick guides on getting started and examples on how to use it.
Visit [mongodb.com/docs/atlas/device-sdks/web/](https://www.mongodb.com/docs/atlas/device-sdks/web/) for quick guides on getting started and examples on how to use it.

We're not publishing documentation explicitly for this SDK, but we aim to align names and method signatures identical for the subset of functionality in Realm Web which is also available in the Realm JS SDK. For this reason, the [Realm JS reference manual](https://docs.mongodb.com/realm-sdks/js/latest/) is a great start to learn about the classes and methods provided by the Realm Web SDK.
We're not publishing documentation explicitly for this SDK, but we aim to align names and method signatures identical for the subset of functionality in Realm Web which is also available in the Realm JS SDK. For this reason, the [mongodb.com/docs/realm-sdks/js/latest/](https://www.mongodb.com/docs/realm-sdks/js/latest/) is a great start to learn about the classes and methods provided by the Realm Web SDK.

## Installation

Expand All @@ -25,7 +25,7 @@ As a script-tag in the head of a browser:
## Caveats / limitations

- The Realm Web project *will not* include a Realm Sync client in any foreseeable future. Use the `realm` package to use Realm Sync from a Node.js, ReactNative or Electron environment.
- A limited selection of [services](https://docs.mongodb.com/stitch/services/) are implemented at the moment:
- A limited selection of [app services](https://www.mongodb.com/docs/atlas/app-services/mongodb/) are implemented at the moment:
- MongoDB: Read, write and watch MongoDB documents.

<!--
Expand All @@ -36,4 +36,4 @@ You must install two additional dependencies when importing this package from No
```
npm install node-fetch abort-controller
```
-->
-->
8 changes: 4 additions & 4 deletions packages/realm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,27 @@ Realm is a mobile database that runs directly inside phones, tablets or wearable

<img align="right" style="min-width:150px;width:20%;" src="https://raw.githubusercontent.com/realm/realm-js/main/media/atlas-device-sync.svg" alt="Atlas Device Sync">

The [Atlas Device SDKs](https://www.mongodb.com/docs/realm/sdk/) are a collection of language and platform specific SDKs, each with a suite of app development tools optimized for data access and persistence on mobile and edge devices. Use the SDKs to build data-driven mobile, edge, web, desktop, and IoT apps.
The [Atlas Device SDKs](https://www.mongodb.com/docs/atlas/device-sdks/) are a collection of language and platform specific SDKs, each with a suite of app development tools optimized for data access and persistence on mobile and edge devices. Use the SDKs to build data-driven mobile, edge, web, desktop, and IoT apps.

It might help to think of the Realm database as the persistance layer of the Atlas Device SDKs.

## Features

* **Mobile-first:** Realm is the first database built from the ground up to run directly inside phones, tablets and wearables.
* **Simple:** Data is directly [exposed as objects](https://www.mongodb.com/docs/realm/sdk/node/realm-files/) and [queryable by code](https://www.mongodb.com/docs/realm/sdk/node/crud/query-data/), removing the need for ORM's riddled with performance & maintenance issues.
* **Simple:** Data is directly [exposed as objects](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/realm-files/) and [queryable by code](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/crud/query-data/), removing the need for ORM's riddled with performance & maintenance issues.
* **Modern:** The database supports relationships, generics, and vectorization.
* **Fast:** It is faster than even raw SQLite on common operations, while maintaining an extremely rich feature set.
* **[MongoDB Atlas Device Sync](https://www.mongodb.com/atlas/app-services/device-sync)**: Makes it simple to keep data in sync across users, devices, and your backend in real time. Get started for free with [a template application](https://github.com/mongodb/template-app-react-native-todo) and [create the cloud backend](http://mongodb.com/realm/register?utm_medium=github_atlas_CTA&utm_source=realm_js_github).

## Getting Started

Please see the detailed instructions in our docs to use [Atlas Device SDK for Node.js](https://www.mongodb.com/docs/realm/sdk/node/) and [Atlas Device SDK for React Native](https://www.mongodb.com/docs/realm/sdk/react-native/). Please notice that currently only Node.js version 18 or later is supported. For React Native users, we have a [compatibility matrix](https://github.com/realm/realm-js/blob/HEAD/COMPATIBILITY.md) showing which versions are supported.
Please see the detailed instructions in our docs to use [Atlas Device SDK for Node.js](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/) and [Atlas Device SDK for React Native](https://www.mongodb.com/docs/atlas/device-sdks/sdk/react-native/). Please notice that currently only Node.js version 18 or later is supported. For React Native users, we have a [compatibility matrix](https://github.com/realm/realm-js/blob/HEAD/COMPATIBILITY.md) showing which versions are supported.

## Documentation

### Atlas Device SDKs for React Native and Node.js

The documentation for the Atlas Device SDK for React Native can be found at [mongodb.com/docs/realm/sdk/react-native/](https://www.mongodb.com/docs/realm/sdk/react-native/). The documentation for the Atlas Device SDK for Node.js can be found at [mongodb.com/docs/realm/sdk/node](https://www.mongodb.com/docs/realm/sdk/node/).
The documentation for the Atlas Device SDK for React Native can be found at [mongodb.com/docs/atlas/device-sdks/sdk/react-native/](https://www.mongodb.com/docs/atlas/device-sdks/sdk/react-native/). The documentation for the Atlas Device SDK for Node.js can be found at [mongodb.com/docs/atlas/device-sdks/sdk/node/](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/).

The API reference is located at [docs.mongodb.com/realm-sdks/js/latest/](https://docs.mongodb.com/realm-sdks/js/latest/).

Expand Down