Constructor Summary
| Public Constructor | ||
| public |
constructor(dispatcher: Dispatcher) Creates a new store instance. |
|
Member Summary
| Public Members | ||
| public |
|
|
| public |
|
|
| public |
dispatcher: * |
|
| public |
handler: * |
|
Method Summary
| Public Methods | ||
| public |
activate() Activates the store by registering to handle actions. |
|
| public |
attachStore(name: String, store: Store): Function Attaches another store to this store's state. |
|
| public |
Activates the store only if its not activate yet and there's at least one callback registered. |
|
| public |
Deactivates the store only if its been activated and there aren't any callbacks registered. |
|
| public |
Activates the store by deregistering the action handler. |
|
| public |
detachStore(store: Store) Detaches a previously attached store from this store's state. |
|
| public |
Extends the store with given methods. |
|
| public |
Gets the action handler. |
|
| public |
setActionHandler(handler: Function) Sets the action handler. |
|
| public |
Called after store is activated. |
|
| public |
Called before store is activated. |
|
| public |
Called before store is deactivated. |
|
| public |
Exports store state to props object. |
|
| Private Methods | ||
| private |
callActionHandler(handler: Function, action: Object) Calls the action handler. |
|
Public Constructors
public constructor(dispatcher: Dispatcher) source
Creates a new store instance.
Params:
| Name | Type | Attribute | Description |
| dispatcher | Dispatcher |
Public Members
public actionHandler: * source
public attachedStores: * source
public dispatcher: * source
public handler: * source
Public Methods
public attachStore(name: String, store: Store): Function source
Attaches another store to this store's state.
public autoActivate() source
Activates the store only if its not activate yet and there's at least one callback registered.
public autoDeactivate() source
Deactivates the store only if its been activated and there aren't any callbacks registered.
public detachStore(store: Store) source
Detaches a previously attached store from this store's state.
Params:
| Name | Type | Attribute | Description |
| store | Store |
public extend(methods: Object) source
Extends the store with given methods.
Params:
| Name | Type | Attribute | Description |
| methods | Object |
public setActionHandler(handler: Function) source
Sets the action handler.
Params:
| Name | Type | Attribute | Description |
| handler | Function |