JSPM

  • Created
  • Published
  • Downloads 2881
  • Score
    100M100P100Q107801F
  • License MIT

Reactive state graph for React, Preact, and vanilla

Package Exports

  • atom.io
  • atom.io/json
  • atom.io/json/package.json
  • atom.io/package.json
  • atom.io/react
  • atom.io/react-devtools
  • atom.io/react-devtools/package.json
  • atom.io/react/package.json
  • atom.io/realtime
  • atom.io/realtime-react
  • atom.io/realtime-react/package.json
  • atom.io/realtime-testing
  • atom.io/realtime-testing/package.json
  • atom.io/realtime/package.json

Readme

features

  • atoms and selectors
  • implicit store
  • readonly selectors
  • settable selectors
  • "tokens" safely expose atoms and selectors
  • give atoms and selectors separate types with a common base
  • utility function to pass logger to your store
  • selector memoization
  • atom and selector families
  • atom effects
  • transactions
  • async effects
  • atom default as function
  • check whether an atom is "default" (never set)
  • customizable logging
  • subscribe to transactions
  • timelines
  • subscribe to families

atom.io

upcoming features

  • suppressor: ({oldValue, newValue}) => boolean
  • resettable atoms
  • resettable selectors

documentation

  • document atom and selector families
  • document atom and selector
  • document transactions

src/internal/meta

  • subscribe to creation of atom tokens
  • subscribe to creation of selector tokens
  • subscribe to creation of readonly selector tokens
  • reimplement state indices as selectors
  • subscribe to creation of transaction tokens
  • subscribe to creation of timeline tokens
  • subscribe to changes in store configuration

/react-devtools

/react

features

  • useStore
  • useI, useO, useIO
  • useTimeline
  • useStoreIndex
  • useTransactionIO

/realtime

  • expose single atom and selector
  • expose atom family and selector family
  • receive single atom and selector
  • receive atom family and selector family
  • receive transaction params, run transaction
  • assess transaction impact (active subscriptions influenced by transaction)
  • return transaction impact as timeline event
  • identity-based exposure and receipt
  • expose selector as atom

/react-realtime

example: what's in the box? (options: green apple, green banana, red apple, red banana) - no player gets to see what's in the box - player 1 can see the color of the item in the box - a register must be kept allocating "subscription permissions" per player - sometimes permissions may refer to "true" or "global" state; sometimes to state that is "virtual" or "local" to the player - player 2 can see the type of the item in the box - atom<${string}____${string}> boxItem - selector boxItemColor - selector boxItemType

-

/web-fx

features

  • localStorage and sessionStorage effects