-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
Ensure library works for an Asynchronous E2E example by writing a test for it.
i.e.:
const Counter = statePatterns(
stateHook(
(props) => ({ users: [], loading: false, error: null }),
{
fetchUsers: state => (sucessCb, errorCB) => { /* Make call and utilize callbacks */ },
fetchUsersSuccess: () => users => ({ users, error: null, loading: false }),
fetchUsersError: () => error => ({ users: [], error, loading: false })
},
"userStore"
),
);