Browse guides

Inspect Valyrian.js state with DevTools

Inspect Valyrian.js state changes in Redux DevTools.

The counter example connects its current pulse, renders the reader and produces the same value when the extension is unavailable.

Table of contents

Main APIs

connectPulse
Bridges one pulse to Redux DevTools.
connectPulseStore
Bridges a pulse store to Redux DevTools.
connectFluxStore
Bridges a Flux store to Redux DevTools.
ts
import { mount } from "valyrian.js";
import { createPulse } from "valyrian.js/pulses";
import { connectPulse } from "valyrian.js/redux-devtools";

const count = connectPulse(createPulse(0), { name: "Count" });

mount("body", () => `Count: ${count[0]()}`);

Error

When Redux DevTools is unavailable, the connectors return without opening an inspection connection.

Exact references