-
-
Notifications
You must be signed in to change notification settings - Fork 716
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
Only run after and enrich interceptors against an effect db, not coeffect db #453
Comments
frenata
added a commit
to frenata/re-frame
that referenced
this issue
Oct 28, 2018
Previously both standard interceptors acted upon the `db` *coffect* if no *effect* was available. Per day8#453 and related discussion, there is little reason in general to do this, since this context means that the `app-db` should not change. Both functions are changed to explicitly check for the presence of the `db` effect. If it is not present in the context, the interceptor function is not run. The previous functionality around `nil` and `false` values for the `db` effect is preserved: the interceptors *are* run in this case. Tests are added to verify the behavior of both functions in the case of non-presence, falsey and truthy values. The relevant docstrings are tweaked to accomodate this change. Closes day8#453.
frenata
added a commit
to frenata/re-frame
that referenced
this issue
Oct 28, 2018
Previously both standard interceptors acted upon the `db` *coeffect* if no *effect* was available. Per day8#453 and related discussion, there is little reason in general to do this, since this context means that the `app-db` should not change. Both functions are changed to explicitly check for the presence of the `db` effect. If it is not present in the context, the interceptor function is not run. The previous functionality around `nil` and `false` values for the `db` effect is preserved: the interceptors *are* run in this case. Tests are added to verify the behavior of both functions in the case of non-presence, falsey and truthy values. The relevant docstrings are tweaked to accommodate this change. Closes day8#453.
frenata
added a commit
to frenata/re-frame
that referenced
this issue
Oct 28, 2018
Previously both standard interceptors acted upon the `db` *coeffect* if no *effect* was available. Per day8#453 and related discussion, there is little reason in general to do this, since this context means that the `app-db` should not change. Both functions are changed to explicitly check for the presence of the `db` effect. If it is not present in the context, the interceptor function is not run. The previous functionality around `nil` and `false` values for the `db` effect is preserved: the interceptors *are* run in this case. Tests are added to verify the behavior of both functions in the case of non-presence, falsey and truthy values. The relevant docstrings are tweaked to accommodate this change. Closes day8#453.
frenata
added a commit
to frenata/re-frame
that referenced
this issue
Oct 28, 2018
Previously both standard interceptors acted upon the `db` *coeffect* if no *effect* was available. Per day8#453 and related discussion, there is little reason in general to do this, since this context means that the `app-db` should not change. Both functions are changed to explicitly check for the presence of the `db` effect. If it is not present in the context, the interceptor function is not run. The previous functionality around `nil` and `false` values for the `db` effect is preserved: the interceptors *are* run in this case. Tests are added to verify the behavior of both functions in the case of non-presence, falsey and truthy values. The relevant docstrings are tweaked to accommodate this change. Closes day8#453.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Following on from #447 and #450, it was discovered that there is probably not a lot of point in running
after
orenrich
interceptors against a coeffect db if an effect db wasn't returned. This is technically a breaking API change, but I'd be surprised if it affected anyone.Current behaviour
If an event handler doesn't return a db effect, an
after
orenrich
interceptor is run against the db coeffect.Proposed behaviour
If an event handler doesn't return a db effect, no
after
orenrich
interceptor is run.The text was updated successfully, but these errors were encountered: