(add-global-interceptors)
(add-global-interceptors group)
Adds a global interceptor group to the beginning of the current queue. The Re-frame implementation allows for ordered dependencies between global interceptors. But the order is based on the order they are registered, which is runtime dependent. This introduces considerable imperative complexity to the interceptor chain. The Reflet implementation tries to have it both ways. With this function you can define groups of global interceptors, and order the groups statically in code within the interceptor chain. However, because the membership of the group is dynamically determined at runtime, the order within each group is left undefined. For example, you could statically declare ALL FSM interceptors should happen before ALL input validation interceptors, but have no defined order within either group. This results in a more robust architecture, while retaining some imperative control.
Adds a global interceptor group to the beginning of the current queue. The Re-frame implementation allows for ordered dependencies between global interceptors. But the order is based on the order they are registered, which is runtime dependent. This introduces considerable imperative complexity to the interceptor chain. The Reflet implementation tries to have it both ways. With this function you can define groups of global interceptors, and order the groups statically in code within the interceptor chain. However, because the membership of the group is dynamically determined at runtime, the order within each group is left undefined. For example, you could statically declare ALL FSM interceptors should happen before ALL input validation interceptors, but have no defined order within either group. This results in a more robust architecture, while retaining some imperative control.
(global-interceptor-registered? id)
(global-interceptor-registered? group id)
(reg-event id impl-itors handler)
(reg-event id impl-itors user-itors handler)
Registers a pre-wrapped interceptor handler.
Registers a pre-wrapped interceptor handler.
(reg-event-ctx-impl id impl-itors handler)
(reg-event-ctx-impl id impl-itors user-itors handler)
(reg-event-db-impl id impl-itors handler)
(reg-event-db-impl id impl-itors user-itors handler)
(reg-event-fx-impl id impl-itors handler)
(reg-event-fx-impl id impl-itors user-itors handler)
(reg-global-interceptor id interceptor)
(reg-global-interceptor group id interceptor)
(same-cycle? id)
Cycle ids can be used to ensure that interceptor operations from different runtime lifecycles do not clobber each other. For example, you can use this function to check if the lifecycle handler from BEFORE a hot reload is attempting to clear an interceptor that was registered AFTER the hot reload.
Cycle ids can be used to ensure that interceptor operations from different runtime lifecycles do not clobber each other. For example, you can use this function to check if the lifecycle handler from BEFORE a hot reload is attempting to clear an interceptor that was registered AFTER the hot reload.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close