Skip to content
This repository has been archived by the owner on May 27, 2020. It is now read-only.

Dispatch methods should not include listeners for other state models #4

Closed
CaptainCodeman opened this issue Dec 18, 2019 · 0 comments
Closed

Comments

@CaptainCodeman
Copy link
Owner

CaptainCodeman commented Dec 18, 2019

The reducer or effect that listens for action from another state model should not appear in the list of methods for a model.

Should be callable:

effects: (dispatch, getState) => ({
  load: async () => {
    //
  }
})

Should not be callable:

effects: (dispatch, getState) => ({
  'auth/signedIn': async () => {
    //
  }
})

Anything containing '/' needs to be filtered out of the types (not sure if Typescript supports that, it would mean a condition based on a string match on a key)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant