New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal #8
Comments
Couldn't you merge |
Yes you can, I just think |
How are you distinguishing between the dispatch and the action? To me they're synonymous (or rather, each action represents a distinct dispatch). I get your "class vs. instance" analogy from our Slack conversation, but I don't really think it fits. To me the only field here that kinda feels like a "class" property is |
We need more information than just the type. Since the type can be anything. In alt I include a string representation of the type, the name of the action, and the namespace. Everything else is dispatch info. |
Okay, so if everything else is dispatch info, |
Could actions in Alt look like this instead? {
// any: Symbol, string, number, object, function. A unique way to identify the action dispatched
type: ActionTypes.ADD_TODO,
// any: whatever is being dispatched
payload: { text: 'Create FSA Proposal' },
// information about the action itself
meta: {
// string | number: a unique identifier for the dispatch
id: 'abcdef123',
// string representation of the particular action type
// since Symbols are not strings and action type can be anything, having a way to identify an
// action as a string is useful for serializing, debugging, and logging.
displayType: 'ActionTypes.ADD_TODO'
}
} |
yeah that looks good enough. Not sure about the displayType name but we can work on it |
Closing this in favor of #4 which looks like a better issue. |
Continuing from our conversation on slack:
There's a difference between dispatch and action. I need to uniquely identify dispatches, this is useful for time travel, rollback, etc. I also need to be able to unique identify actions, this is good for logging and debugging.
I think this is a good MVP. I was using
details
for action information in alt but I think action is a better name.The text was updated successfully, but these errors were encountered: