# @superlayer/react

> Superlayer for React

Latest version **2.0.0** (published 2026-09-24) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @superlayer/react
pnpm add @superlayer/react
yarn add @superlayer/react
bun add @superlayer/react
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2026-09-24 |
| First published | 2026-09-22 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 687.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | interfacelondon |

## Links

- npm: https://www.npmjs.com/package/@superlayer/react
- Repository: https://github.com/InterfaceLDN/Superlayer
- Homepage: https://github.com/InterfaceLDN/Superlayer/tree/main/client/packages/react
- Issues: https://github.com/InterfaceLDN/Superlayer/issues
- npm.io page: https://npm.io/package/@superlayer/react

## Dependencies (4)

- [eventsource](https://npm.io/package/eventsource.md) ^4.0.0
- [@superlayer/core](https://npm.io/package/@superlayer/core.md) 2.0.0
- [@superlayer/version](https://npm.io/package/@superlayer/version.md) 2.0.0
- [@superlayer/react-common](https://npm.io/package/@superlayer/react-common.md) 2.0.0

## Recent versions

- 2.0.0 (latest) — 2026-09-24
- 1.0.67 — 2026-09-22

## README

# @superlayer/react

Superlayer for React.

[Documentation](https://interfacedb.com/docs) · [Source](https://github.com/InterfaceLDN/Superlayer)

Maintained by Superlayer. See LICENSE.md and NOTICE for upstream attribution.

Welcome to [Superlayer’s](https://interfacedb.com) React SDK.

```javascript
// ༼ つ ◕_◕ ༽つ Real-time Chat
// ----------------------------------
// * Updates instantly
// * Multiplayer
// * Works offline

import { init, id } from '@superlayer/react';

const db = init({
  appId: process.env.NEXT_PUBLIC_APP_ID,
});

function Chat() {
  // 1. Read
  const { isLoading, error, data } = db.useQuery({
    messages: {},
  });

  // 2. Write
  const addMessage = (message) => {
    db.transact(db.tx.messages[id()].update(message));
  };

  // 3. Render!
  return <UI data={data} onAdd={addMessage} />;
}
```

# Get Started

Follow the [getting started](https://www.interfacedb.com/docs) tutorial to set up a live React app in under 5 minutes!

# Questions?

If you have any questions, feel free to drop us a line on our [issue tracker](https://github.com/InterfaceLDN/Superlayer/issues)

---
_Source: https://npm.io/package/@superlayer/react · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
