Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/effector/packages/effector/index.d.ts>scopeBind

Business logic with ease ☄️
Go to Latest
function scopeBind
import { scopeBind } from "https://deno.land/x/effector@effector-react%4023.2.0/packages/effector/index.d.ts";

Bind event to a scope to be called later.

When scope is not provided this method retrieve scope implicitly from scope of the handler (effect handler or watch function) inside which it's being called

Parameters

event to bind

optional
opts: { scope?: Scope; safe?: boolean; }

Returns

(payload: T) => void

function which will trigger an event in a given scope

Bind effect to a scope to be called later.

When scope is not provided this method retrieve scope implicitly from scope of the handler (effect handler or watch function) inside which it's being called

Type Parameters

P
D
optional
F = Error

Parameters

unit: Effect<P, D, F>

effect to bind

optional
opts: { scope?: Scope; safe?: boolean; }

Returns

(params: P) => Promise<D>

function which will trigger an effect in a given scope and returns a promise with a result

Bind arbitary callback to a scope to be called later. When scope is not provided this method retrieve scope implicitly from scope of the handler (effect handler or watch function) inside which it's being called

Type Parameters

T extends Function

Parameters

fn: T

effect to bind

optional
opts: { scope?: Scope; safe?: boolean; }

Returns

function which will trigger an effect in a given scope and returns a promise with a result