Options
All
  • Public
  • Public/Protected
  • All
Menu

A data structure useful for providing a controlled, predictable mechanism for mutability. Allows multiple components of a program to share read/write access to some state in such a way that no component can mutate another component's current reference to the state in the middle of some process or asynchronous operation.

Type Parameters

  • S = any

Hierarchy

  • Atom

Index

Methods

Methods

  • Constructs a new instance of Atom with its internal state set to state.

    example

    import { Atom } from '@steem-monsters/atom'

    const a1 = Atom.of(0)
    const a2 = Atom.of("zero")
    const a3 = Atom.of({ count: 0 })

    Type Parameters

    • S

    Parameters

    Returns Atom<S>