Namespace: Morearty

Morearty

Morearty main module. Exposes createContext function.
Source:

Namespaces

Mixin

Members

(static) Binding

Binding module.
Source:
See:

(static) Callback

Callback module.
Source:
See:

(static) DOM

DOM module.
Source:
See:

(static) History

History module.
Source:
See:

(static) MergeStrategy

Merge strategy.

Describes how existing state should be merged with component's default state on mount. Predefined strategies:

  • OVERWRITE - overwrite current state with default state;
  • OVERWRITE_EMPTY - overwrite current state with default state only if current state is null or empty collection;
  • MERGE_PRESERVE - deep merge current state into default state;
  • MERGE_REPLACE - deep merge default state into current state.
Source:

(static) Util

Util module.
Source:
See:

Methods

(static) createContext(specopt) → {Context}

Create Morearty context.
Parameters:
Name Type Attributes Description
spec Object <optional>
spec object
Properties
Name Type Attributes Default Description
initialState Immutable.Map | Object <optional>
{} initial state
initialMetaState Immutable.Map | Object <optional>
{} initial meta-state
options Object <optional>
{} options object
Properties
Name Type Attributes Default Description
requestAnimationFrameEnabled Boolean <optional>
true enable rendering in requestAnimationFrame
renderOnce Boolean <optional>
false ensure render is executed only once (useful for server-side rendering to save resources), any further state updates are ignored
stopOnRenderError Boolean <optional>
false stop on errors during render
logger Object <optional>
an optional logger object for reporting errors
Properties
Name Type Attributes Description
error function <optional>
function accepting error message and optional cause
Source:
Returns:
Type
Context