Skip to content

v1.0

Choose a tag to compare

@elusivecodes elusivecodes released this 21 Mar 12:07
· 16 commits to main since this release

Initial stable release of FrostState.

FrostState provides small reactive state primitives for values, effects, and keyed stores, with zero runtime dependencies and support for Node, bundlers, and a browser UMD bundle.

Highlights

  • Added useState(value) for callable reactive state accessors
  • Added useEffect(callback, options) for dependency-tracked reactive effects
  • Added StateStore for proxy-backed keyed state
  • Added StateStore.wrap(...) and StateStore.merge(...) for object-to-store workflows
  • Added browser UMD builds in dist/ exposed as globalThis.State
  • Added JSDoc-powered IntelliSense across the public API

Runtime behavior

  • useEffect() runs immediately and schedules normal re-runs in a microtask
  • effect.sync() is available for immediate re-execution
  • StateStore property reads return existing keys and property assignment writes keys
  • Missing StateStore property reads return undefined
  • Missing keys read during effect tracking subscribe to later assignment without becoming visible keys
  • store.set(...) is shallow by default
  • Nested reactive stores are available through StateStore.wrap(..., { deep: true }) and StateStore.merge(..., { deep: true })
  • API keys such as use, set, has, and keys are reserved

Quality

  • Added test coverage for state access, effects, keyed stores, nested store behavior, reserved keys, and effect error handling
  • Added CI for lint, test, build, and package validation
  • Added npm publish workflow with provenance support

Notes

  • The package is ESM-only
  • Weak effects rely on WeakRef