Liking cljdoc? Tell your friends :D

reacl-c.test-util.core


collect-actionscljs

(collect-actions item atom)

Returns an item that is like item, but will capture all emitted actions and conj them into the given atom instead.

Returns an item that is like `item`, but will capture all emitted actions and
conj them into the given atom instead.
sourceraw docstring

disable-subscriptionscljs

(disable-subscriptions item)
(disable-subscriptions item subs)

Returns an item like item, but where all subscriptions (or the the given subscriptions) are not executed when emitted from item.

Returns an item like `item`, but where all subscriptions (or the
the given subscriptions) are not executed when emitted from `item`.
sourceraw docstring

effect-argscljs

(effect-args eff)

Returns the arguments for the function returned by effect-f.

Returns the arguments for the function returned by [[effect-f]].
sourceraw docstring

effect-fcljs

(effect-f eff)

Returns the function implementing the effect behind the given simple effect action. See simple-effect?.

Returns the function implementing the effect behind the given simple effect action. See [[simple-effect?]].
sourceraw docstring

effect?cljs

(effect? a & [eff-defn])

Returns true if the given action is an effect action, and optionally if it was created by the given effect function.

Returns true if the given action is an effect action, and
optionally if it was created by the given effect function.
sourceraw docstring

emulate-subscriptionscljs

(emulate-subscriptions item f)

Returns an item, that for all subscriptions done in item, evaluates (f subscription-effect). The function [[subscription-effect?]] can be used to check which kind of subscription effect it is. If it evaluates to nil or the same effect that was passed in, it is just passed on. If it evaluates to a different action, that action is emitted from the subscription itself, i.e. emulating a (synchronous) result of the subscription.

Returns an item, that for all subscriptions done in `item`,
evaluates `(f subscription-effect)`. The
function [[subscription-effect?]] can be used to check which kind of
subscription effect it is. If it evaluates to `nil` or the same
effect that was passed in, it is just passed on. If it evaluates to
a different action, that action is emitted from the subscription
itself, i.e. emulating a (synchronous) result of the subscription.
sourceraw docstring

map-subscriptionscljs

(map-subscriptions item f)

Returns an item that replaces subscriptions in item. Note that item itself remains unchanged; instead, whenever a subscription is activated in item, f will be called with that subscription, and if it returns a different subscription, then that is activated instead. If it returns nil, then the original subscription will be actived.

You can use subscription? and subscription-args, if the replacement depends on details of the subscription or for mapping a whole group of subscriptions.

Returns an item that replaces subscriptions in `item`. Note that
`item` itself remains unchanged; instead, whenever a subscription is
activated in `item`, `f` will be called with that subscription, and
if it returns a different subscription, then that is activated
instead. If it returns nil, then the original subscription will be
actived.

You can use [[subscription?]] and [[subscription-args]], if the
replacement depends on details of the subscription or for mapping a
whole group of subscriptions.
sourceraw docstring

preventing-error-logcljs

(preventing-error-log thunk)

Prevents a log message about an exception during the evaluation of thunk, which occurs even when the error is handled in an error boundary. If thunk returns a promise, then error logs are enabled after that completes instead.

Prevents a log message about an exception during the evaluation of
`thunk`, which occurs even when the error is handled in an error
boundary. If `thunk` returns a promise, then error logs are enabled
after that completes instead.
sourceraw docstring

providedcljmacro

(provided bindings & body)
source

run-effect!cljs

(run-effect! eff)

Returns a tuple [value ret]. If an effect returns a reacl-c.core/return value, then 'value' is the returned state, and 'ret' everything else. For any other value, 'ret' is empty.

Returns a tuple `[value ret]`. If an effect returns a [[reacl-c.core/return]]
value, then 'value' is the returned state, and 'ret' everything else.
For any other value, 'ret' is empty.
sourceraw docstring

run-subscription!cljs

(run-subscription! sub deliver!)

Calls the function implementing the given subscription with the given deliver! function, returning the stop function for it.

Calls the function implementing the given subscription with the given `deliver!` function, returning the stop function for it.
sourceraw docstring

simple-effect?cljs

(simple-effect? a & [eff-defn])

Returns true for effects created by [[core/effect]] or [[core/defn-effect]], but false for those created from [[core/seq-effects]].

Returns true for effects created by [[core/effect]]
or [[core/defn-effect]], but false for those created
from [[core/seq-effects]].
sourceraw docstring

subscribe-effect-argscljs

(subscribe-effect-args eff)

The arguments passed to the subscription the given subscribe effect was generated from.

The arguments passed to the subscription the given subscribe effect was generated from.
sourceraw docstring

subscribe-effect-fncljs

(subscribe-effect-fn eff)

The function passed to the subscription the given subscribe effect was generated from.

The function passed to the subscription the given subscribe effect was generated from.
sourceraw docstring

subscribe-effect?cljs

(subscribe-effect? eff)
(subscribe-effect? eff subs)

Tests if the given effect, is one that is emitted by a subscription equal to the given one on mount. This can be useful in unit tests.

Tests if the given effect, is one that is emitted by a subscription
equal to the given one on mount. This can be useful in unit tests.
sourceraw docstring

subscription-argscljs

(subscription-args sub)

Returns extra arguments for the function implementing the given subscription item. See subscription-f

Returns extra arguments for the function implementing the given subscription item. See [[subscription-f]]
sourceraw docstring

subscription-fcljs

(subscription-f sub)

Returns the function implementing the given subscription item.

Returns the function implementing the given subscription item.
sourceraw docstring

subscription-resultscljs

(subscription-results sub num-actions & [timeout-ms])

Runs the given subscription, asynchronously waiting for at least the given number of actions emitted by it (or the given timeout elapses), and then stops the subscription. Returns a promise of the sequence of actions.

Runs the given subscription, asynchronously waiting for at least the
given number of actions emitted by it (or the given timeout
elapses), and then stops the subscription. Returns a promise of the
sequence of actions.
sourceraw docstring

subscription?cljs

(subscription? v)
(subscription? v f)

Returns whether item is a subscription item, optinally also checking if it was created by the given defn-subscription function or with the given function f as its implementation.

Returns whether `item` is a subscription item, optinally also
checking if it was created by the given `defn-subscription` function
or with the given function `f` as its implementation.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close