diff --git a/CHANGELOG.md b/CHANGELOG.md index 4948107712..b2a324b74b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ +* Update URLs to documentation. ## 12.7.0 (2024-04-17) diff --git a/packages/babel-plugin/README.md b/packages/babel-plugin/README.md index 87cb050fda..5ad6bd0c97 100644 --- a/packages/babel-plugin/README.md +++ b/packages/babel-plugin/README.md @@ -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 | | -------------------------------------------- | ----------------- | --------------- | ----------------------- | -------------------------------------------------------------------------------------- | @@ -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 | | --------------- | --------- | -------------------------------------------------------------------------- | @@ -200,7 +200,7 @@ export class Task extends Realm.Object { ### 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. diff --git a/packages/realm-react/README.md b/packages/realm-react/README.md index 4ae1e9aa64..03242a081c 100644 --- a/packages/realm-react/README.md +++ b/packages/realm-react/README.md @@ -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'; @@ -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. 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 @@ -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'; @@ -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: diff --git a/packages/realm-web/README.md b/packages/realm-web/README.md index 6fada8729d..661e62847e 100644 --- a/packages/realm-web/README.md +++ b/packages/realm-web/README.md @@ -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 @@ -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. \ No newline at end of file +--> diff --git a/packages/realm/README.md b/packages/realm/README.md index 89a562e901..d19e3187b6 100644 --- a/packages/realm/README.md +++ b/packages/realm/README.md @@ -14,27 +14,27 @@ Realm is a mobile database that runs directly inside phones, tablets or wearable 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/).