Closed fabienjuif closed 5 years ago
Maybe this is better to have when(match(store.data.shows.set))
and match
helper would do this:
const match = (matcher) => (action) => {
if (!matcher.krmlAction) return false
return action.type === store.data.shows.set.TYPE
}
So everytime a TYPE
is set to a function this is usable (not only with krf for a near future).
But if we do this, we have to rewrite part of toContext.js
to move those types
Nevermind, finally I think this is better to stick to k-redux-factory. So users that know k-redux-factory don't have to switch their mind when they dev with/for k-ramel.
So we come back to when((action, store) => action.type === store.data.shows.SET)
This is already possible, I updated the documentation to add some matcher example.
So a user can do
when((action, store) => action.type === store.data.shows.SET)