Skip to content

Latest commit

 

History

History
97 lines (69 loc) · 3.96 KB

File metadata and controls

97 lines (69 loc) · 3.96 KB

Functions

bindState(thisBind)innerBind

Utility for two-way-binding objects in React component state.

bindStateImmutable(thisBind)innerBind

Utility for two-way-binding Immutable.JS objects in React component state.

createBoundInput(thisBind)BoundInput

Creates the BoundInput component.

createReducer(initialState, reducers)

Utility for creating Redux reducers.

bindState(thisBind) ⇒ innerBind

Utility for two-way-binding objects in React component state.

Kind: global function

Param Type Description
thisBind React.Component this of the component the function is used in.

bindState~innerBind(path, formatter)

Kind: inner method of bindState

Param Type Description
path Array.<(string|number)> | string The path in the state to bind to.
formatter function Optional formatter for the input value, for example for numeric fields.

bindStateImmutable(thisBind) ⇒ innerBind

Utility for two-way-binding Immutable.JS objects in React component state.

Kind: global function

Param Type Description
thisBind React.Component this of the component the function is used in.

bindStateImmutable~innerBind(path, formatter)

Kind: inner method of bindStateImmutable

Param Type Description
path Array.<(string|number)> The path in the state to bind to. Must be atleast two keys deep.
formatter function Optional formatter for the input value, for example for numeric fields.

createBoundInput(thisBind) ⇒ BoundInput

Creates the BoundInput component.

Kind: global function

Param Type Description
thisBind React.Component this of the component the function is used in.

createBoundInput~BoundInput(type, path, formatter, immutable, boolean)

The main BoundInput component.

Kind: inner method of createBoundInput

Param Type Description
type string Type of the input, including select which allows you to embed the options used as children.
path Array | string The path in the state to bind to.
formatter function Optional formatter for the input value, for example for numeric fields. Cannot be used with checkboxes.
immutable boolean Flag to tell the BoundInput component if the state uses Immutable.JS containers as part of its state. Defaults to false.
boolean boolean Flag to switch between boolean/value mode in checkboxes. No-op if used with other input types (for now, at least). Defaults to false.

createReducer(initialState, reducers)

Utility for creating Redux reducers.

Kind: global function

Param Type Description
initialState object Initial state of the reducer.
reducers object Object containing the reducers, keyed by the action constant.