Skip to main content
Home
This release is 1 version behind 1.0.1 — the latest version of @snrraptopack/raptor-state. Jump to latest
It is unknown whether this package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
It is unknown whether this package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score
52%
Published
3 days ago (1.0.0)
function State
State<T>(initialValue?: StateValue<T>): StateInstance<T>

Create a new state instance with the given initial value

Type Parameters

Parameters

optional
initialValue: StateValue<T> = null
  • The initial state value

Return Type

StateInstance with core utilities

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@snrraptopack/raptor-state

Import symbol

import { State } from "@snrraptopack/raptor-state";
or

Import directly with a jsr specifier

import { State } from "jsr:@snrraptopack/raptor-state";

Add Package

pnpm i jsr:@snrraptopack/raptor-state
or (using pnpm 10.8 or older)
pnpm dlx jsr add @snrraptopack/raptor-state

Import symbol

import { State } from "@snrraptopack/raptor-state";

Add Package

yarn add jsr:@snrraptopack/raptor-state
or (using Yarn 4.8 or older)
yarn dlx jsr add @snrraptopack/raptor-state

Import symbol

import { State } from "@snrraptopack/raptor-state";

Add Package

vlt install jsr:@snrraptopack/raptor-state

Import symbol

import { State } from "@snrraptopack/raptor-state";

Add Package

npx jsr add @snrraptopack/raptor-state

Import symbol

import { State } from "@snrraptopack/raptor-state";

Add Package

bunx jsr add @snrraptopack/raptor-state

Import symbol

import { State } from "@snrraptopack/raptor-state";