> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# lynx: registerModule() static method

APISummary
Register a JavaScript value that can be shared within a single LynxView, but not between different LynxViews.

## Syntax

```ts
registerModule: <Module>(name: string, module: Module) => void;
```

### Parameters

#### name

The name of the value.

#### module

The value to be registered, can use any JavaScript types.

### Return Value

None (`undefined`).

## Examples

### Get module from JS

Use the [`lynx.getJSModule`] method to get a registered value:

```js
const fooModule = {};
lynx.registerModule('foo', fooModule);
lynx.getJSModule('foo') === fooModule; // true
```

[`lynx.getJSModule`]: /next/api/lynx-api/lynx/lynx-get-js-module.md

## Compatibility


**Compatibility Table**
**Query:** `lynx-api.lynx.registerModule`

**Platform Support**

| Platform | Version Added | Notes |
|----------|---------------|-------|
| Android | 2.4 | - |
| iOS | 2.4 | - |
| HarmonyOS | 3.4 | - |
| Clay macOS | 3.5 | - |
| Clay Windows | 3.5 | - |
| Web | ✅ Yes | - |

