Skip to content

Asynchronous E2E Test #15

@mcclayton

Description

@mcclayton

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"
  ),
);

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions