Skip to content
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

upgrade to re-frame 1.1.2+ and introduce new fx supporting 2-vector handlers #47

Open
hipitihop opened this issue Mar 30, 2021 · 0 comments

Comments

@hipitihop
Copy link
Contributor

hipitihop commented Mar 30, 2021

As of re-frame 1.1.2 there is a new interceptor available unwrap, this is the result of day8/re-frame#644 which promotes 2-vector of [event-id payload-map]

Proposal

  • For backward compatibility, introduce new fx name. This should be fully namespace qualified.
  • Consider if we want to stick with separate :on-success & :on-failure and instead have one callback e.g. :on-completion. This is prompted by recent observations that often the :on-failure path still needs to be engaged while processing a successful result in :on-success (for example, the resulting data fails Spec) and also thinking forward to handlers which may want to use statecharts.
  • Accept an optional second arg (a map) to the :on-xxxx event vec and assoc/merge results to this payload when dispatching.
  • Add optional path to the fx payload/arguments so consumers can control key collisions in their 2-vector response.
  • Better indication of the fx status (don't confuse this with actual HTTP status code) so it is easier for handlers to deal with error, success, timeout etc

Raising this issue to garner opinion or suggestions

@hipitihop hipitihop changed the title upgrade to re-frame 1.1.2+ and introduce new fx supporting 2-tuple handlers upgrade to re-frame 1.1.2+ and introduce new fx supporting 2-vector handlers Mar 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant