cerebral-computed

0.1.1 • Public • Published

cerebral-computed

A package allowing computed state dependencies in views

import computed from 'cerebral-computed';
 
export default computed({
  foo: 'some.state.path',
  bar: 'some.other.path'
}, state => {
  return state.foo + state.bar
})

This computed can be used in Cerebral view layers:

import myComputed from './myComputed.js'
import {Decorator as Cerebral} from 'cerebral-view-react'
 
@Cerebral({
  someProp: myComputed
})

Readme

Keywords

none

Package Sidebar

Install

npm i cerebral-computed

Weekly Downloads

2

Version

0.1.1

License

ISC

Last publish

Collaborators

  • christianalfoni