@reatom/devtools

0.7.2 • Public • Published

Developer tools for states and actions inspecting

Installation

npm install @reatom/devtools

Note that this package is published with ESM bundle only.

Usage

You typical setup would look like that.

import { createCtx, connectLogger } from '@reatom/framework'
import { connectDevtools } from '@reatom/devtools'

const ctx = createCtx()

if (import.meta.env.DEV) {
  connectLogger(ctx)
  connectDevtools(ctx)
}

// ...

connectDevtools has an optional second argument where you can specify how to process an atoms names.

type Options = {
  separator?: string | RegExp | ((name: string) => Array<string>) // default is /\.|#/
  privatePrefix?: string // default is '_'
}

Package Sidebar

Install

npm i @reatom/devtools

Weekly Downloads

342

Version

0.7.2

License

MIT

Unpacked Size

747 kB

Total Files

18

Last publish

Collaborators

  • artalar