Open tonyhb opened 8 years ago
mutate will mutate data before being passed into the component:
mutate
@load({ users: User.getList().mutate(users => { const byId = {}; users.forEach(u => byId[u.id] = u); return byId; }), }) class Users extends Component { }
Each mutator can be kept in a separate file for reusability. We should let mutator functions chain to keep composability of mutator functions optimal. Can we also automatically memoize these functions, or store the resulting data in a reducer?
mutate
will mutate data before being passed into the component:Each mutator can be kept in a separate file for reusability. We should let mutator functions chain to keep composability of mutator functions optimal. Can we also automatically memoize these functions, or store the resulting data in a reducer?