1.0.7 • Published 1 year ago

react-lambda-state v1.0.7

Weekly downloads
-
License
Apache 2.0
Repository
github
Last release
1 year ago

What is all about

This package giving ability to manage state with calculated fields in React app.

The state defined by model which may contain constants as well as arrow functions & formulas (string that actually executed)

Actions

Action types

  • DEL_PROP
  • SET_PROP
  • CLR_PROP
  • PUSH_PROP

Action functions (can be called directly)

  • delProp (rootState, payload : { name: string, prop: string|number })
  • setProp (rootState, payload : { name: string, value: any })
  • pushProp(rootState, payload : { name: string })
  • clrProp (rootState, payload : { name: string, value: any })

name parameter is a path to the property separated by '.' including arrays

Example:

state = { a: [10, 20, { c : 666 } ] }
setProp(state, {name:'a.2.c', value: 333})
// state === { a: [10, 20, { c : 333 } ] }

Supported internal functions

  • range
  • foreach
  • PVIF
  • FVIFA
  • PMT
  • IPMT
  • PPMT
  • DaysBetween
  • XNPV
  • XIRR
1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago