Members
childContextTypes
Define property for fluxex context delivery
- Source:
displayName
Define displayName
- Source:
propTypes
Define required property for fluxex context receiving
- Source:
Methods
"handle_**UPDATEALL**"()
This method supports magic dispatch('**UPDATEALL') for all stores
- Source:
(protected) _createStore(store, states) → {FluxexStore}
Create a store by store prototype and initial status.
Parameters:
Name | Type | Description |
---|---|---|
store |
Object | prototype for the new store instance |
states |
Object | the initial status of the new store |
- Source:
Returns:
A created store instance
- Type
- FluxexStore
_get(name) → {Object|Number|String|Null}
Get a value or an object by name
Parameters:
Name | Type | Description |
---|---|---|
name |
String | a simple key name |
- Source:
Returns:
the value
- Type
- Object | Number | String | Null
(protected) _initDispatch()
Create and update dispatch queue for all actions
- Source:
(protected) _initStore()
Create store instances and keep context sync.
- Source:
_restore(state)
Restore the FluxexObject status by provided status object
Parameters:
Name | Type | Description |
---|---|---|
state |
Object | the status to restore |
- Source:
(protected) _scanDispatch()
Create and update dispatch info for all actions
- Source:
_set(name) → {FluxexObject}
Set value by name
Parameters:
Name | Type | Description |
---|---|---|
name |
String | a simple key name or json path |
- Source:
Returns:
Self
- Type
- FluxexObject
(protected) _updateDispatch()
Resolve waitFor and detect deadlocks.
- Source:
addChangeListener(handler) → {FluxexStore}
Add a change listener
Parameters:
Name | Type | Description |
---|---|---|
handler |
function | the listener handler |
- Source:
Returns:
Self
- Type
- FluxexStore
dispatch(name, payloadopt) → {Promise}
Dispatch an action with payload
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
name |
string | the action name | |
payload |
Object |
<optional> |
payload for the action |
- Source:
Returns:
A promise instance
- Type
- Promise
emitChange() → {FluxexStore}
Emit a change event for this store
- Source:
Returns:
Self
- Type
- FluxexStore
executeAction(action, …payloadopt) → {Promise}
Execute an action creator with provided payload
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
action |
function | the action creator function | |
payload |
* |
<optional> <repeatable> |
payload or arguments for the action |
- Source:
Returns:
A promise instance
- Type
- Promise
(protected) getChildContext() → {Fluxex}
Pass self context to children.
- Source:
Returns:
The Fluxex application instance
- Type
- Fluxex
getContextedHtml() → {element}
Return HTML get context ready react element.
- Source:
Returns:
the react element represent whole Html
- Type
- element
getStore(name) → {FluxexStore}
Get a store by store name
Parameters:
Name | Type | Description |
---|---|---|
name |
String | store name |
- Source:
Returns:
A fluxex store instance
- Type
- FluxexStore
removeChangeListener(handler) → {FluxexStore}
Remove a change listener
Parameters:
Name | Type | Description |
---|---|---|
handler |
function | the listener handler |
- Source:
Returns:
Self
- Type
- FluxexStore
render()
Change the owner of all children to self and pass context
- Source:
toString() → {String}
Get serialized state
- Source:
Returns:
A JSON string of current status
- Type
- String