unlocomqx / svelte-runes-devtools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Svelte Runes Devtools

Easily inspect runes using Redux Devtools

screenshot

Installation

npm install -D svelte-runes-devtools

Usage

import { devtools } from "$lib/runes-devtools"

let counter = $state(0)
let double = $derived(counter * 2)
let numbers = $derived({ counter, double })

$inspect(counter, devtools("counter"))
$inspect(double, devtools("double"))
$inspect(numbers, devtools("numbers", { trace: true }))

API

devtools(name, options)

Connects to the Redux Devtools extension and returns a function that can be used to inspect a rune.

name (required)

Type: string

The name of the rune. This will be used as the name of the store in the Redux Devtools extension.

options (optional)

Type: object

Reference

About


Languages

Language:TypeScript 51.1%Language:JavaScript 23.4%Language:Svelte 14.3%Language:HTML 11.2%