cerebral-computed
v0.1.1
Published
Package to let cerebral view packages expose computed feature
Readme
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
})