You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
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
: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.:on-xxxx
event vec and assoc/merge results to this payload when dispatching.error
,success
,timeout
etcRaising this issue to garner opinion or suggestions
The text was updated successfully, but these errors were encountered: