Hacker News new | ask | show | jobs
by k__ 3959 days ago
Yes, here some simple examples:

    (state, action) => ({...state, loading: true})

    (state, {error}) => ({...state, error, loading: false})

    (state, {result:{data}}) => ({...state, ...data, loading: false})