createAction
Create actions which you can use in your kea reducers.
Usage
import { createAction } from 'kea'
const newAction = createAction('description', (id, value) => ({ id, value }))
const someLogic = kea({
actions: () => ({
myAction: true
}),
reducers: ({ actions }) => ({
myValue: [false, PropTypes.bool,
[actions.myAction]: () => true,
[newAction]: () => false
]
})
})
// somewhere else
store.dispatch(newAction(12, 'bla'))