Skip to main content

Scope

view on npm

Create a new PlexusJS plugin

.state(item) ⇒

Generate a Plexus State

Returns:

A Plexus State Instance

ParamDescription
item

The default value to use when we generate the state

.computed(item) ⇒

Generate a Plexus State

Returns:

A Plexus State Instance

ParamDescription
item

The default value to use when we generate the state

.event() ⇒

Create a new event Engine

Returns:

An Event Instance

.collection(config) ⇒

Create a new Collection Instance

Returns:

A collection Instance

ParamDescription
config

The configuration for the collection

.action(fn) ⇒

Generate a Plexus Action

Returns:

The intended return value of fn, or null if an error is caught

ParamDescription
fn

The Plexus action function to run

.batchAction(fn) ⇒

Generate a Plexus Action

Returns:

The intended return value of fn, or null if an error is caught

ParamDescription
fn

The Plexus action function to run

.batch(fn)

Run a function. During that function's execution, any state changes will be batched and only applied once the function has finished.

ParamDescription
fn

The function to run in a batch

.preaction(fn) ⇒

Generate a Plexus Action

Returns:

The intended return value of fn, or null if an error is caught

ParamDescription
fn

The Plexus action function to run