-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: make getters generator functions #7
Comments
This idea will be better if keep in mind this issue #8 what allow us to describe getters only for one action type. Than we can write like that const todos = map({
addActionTypes: [
{
todo: 'ADD_ONE_TODO',
keyGetter: action => action.payload.uuid,
},
{
todo: 'ADD_FEW_TODOS',
* keyGetter(action) { yield* action.payload.map(todo => todo.uuid); },
* itemGetter(action) { yield* action.payload; },
},
],
}); |
Those are great suggestions @Romms ! (this and #8) |
What about an idea to make
getter
methods be a generator function? It can allow us to do this for example:I think it is an easy way to solve the problem described here #5 (comment)
The text was updated successfully, but these errors were encountered: