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

Business logic with ease ☄️
Latest
import * as effector from "https://deno.land/x/effector@effector%4023.2.2/packages/effector/index.d.ts";

Classes

A way to group and process events, stores and effects. Useful for logging and assigning a reset trigger to many effects. Domain is notified via onCreateEvent, onCreateStore, onCreateEffect, onCreateDomain methods when events, stores, effects, or nested domains are created

Functions

Run effect in scope and wait for all triggered effects to settle. This method never throw an error

Method for creating state-dependent effect and transforming effect payloads

Method for destroying units and graph nodes. Low level tool, usually absent in common applications

Convert given stores to store with array which values updated upon changes in given ones

Shorthand for creating events attached to store by providing object with reducers for them

Creates a domain

Creates an effect

Creates an event

Method to create a new graph node. Low level tool, usually absent in common applications

Creates a store

Creates isolated instance of application. Primary purposes of this method are SSR and testing.

f
forward
deprecated

Method to create connection between units in a declarative way. Sends updates from one set of units to another

Method to create an event subscribed to given observable

f
guard
deprecated

Method for conditional event routing.

f
hydrate
deprecated

Fill stores with given values in provided scope or domain

Allows to directly start computation from given unit or graph node. Low level tool, usually absent in common applications

Merges array of units (events, effects or stores), returns a new event, which fires upon trigger of any of given units

Creates a Store out of successful results of Effect. It works like a shortcut for createStore(defaultState).on(effect.done, (_, {result}) => result)

Represents a step in a business logic workflow. It tells an application when it should act, which data it needs, how it should be transformed and what should happens next

Bind event to a scope to be called later.

Serialize store values from given scope

Chooses one of the cases by given conditions. It "splits" source unit into several events, which fires when payload matches their conditions. Works like pattern matching for payload values and external stores

Bind units and links between them created inside cb callback to unit or graph node to erase during clearNode call Low level tool, usually absent in common applications

Interfaces

Container for (possibly async) side effects

Event you can subscribe to. It represents a user action, a step in the application process, a command to execute, or an intention to make modifications, among other things.

The function you can call to trigger an event.

Fully isolated instance of application. The primary purpose of scope includes SSR and testing