Files
web/packages/sdk-react
dependabot[bot] 2e352810c3 chore(deps-dev): bump jsdom from 29.1.1 to 30.0.0
Bumps [jsdom](https://github.com/jsdom/jsdom) from 29.1.1 to 30.0.0.
- [Release notes](https://github.com/jsdom/jsdom/releases)
- [Commits](https://github.com/jsdom/jsdom/compare/v29.1.1...v30.0.0)

---
updated-dependencies:
- dependency-name: jsdom
  dependency-version: 30.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-30 08:35:16 +00:00
..
2026-06-16 20:30:08 -04:00
2026-06-16 20:30:08 -04:00
2026-06-16 20:30:08 -04:00
2026-06-16 20:30:08 -04:00

@meshtastic/sdk-react

React hooks and provider for @meshtastic/sdk.

Install

pnpm add @meshtastic/sdk @meshtastic/sdk-react @meshtastic/transport-web-serial

Quickstart

import { MeshClient } from "@meshtastic/sdk";
import { MeshProvider, useDevice, useChat } from "@meshtastic/sdk-react";
import { TransportWebSerial } from "@meshtastic/transport-web-serial";
import { ChannelNumber } from "@meshtastic/sdk";

const transport = await TransportWebSerial.create({ baudRate: 115200 });
const client = new MeshClient({ transport });
await client.connect();

function App() {
  return (
    <MeshProvider client={client}>
      <Status />
    </MeshProvider>
  );
}

function Status() {
  const { status, myNodeNum } = useDevice();
  const { messages, send } = useChat(ChannelNumber.Primary);
  return <div>{status} / {myNodeNum} / {messages.length} msgs</div>;
}

All hooks are read-only against a single MeshClient instance supplied through context. Commands are returned as stable functions.

License

GPL-3.0-only.