Constructor
new Container()
Initializes this container with an empty state {}
.
- See:
-
- Store
Extends
- Component
Members
store :Store
Returns the store.
Type:
- Store
Methods
connectedCallback()
Subscribes to the store and update the view when the state changes.
Don't forget to call the super method when overriding this method.
disconnectedCallback()
Unsubscribes from the store.
Don't forget to call the super method when overriding this method.
extractState(state) → {StateType}
Extracts a subset of the state for this container.
Default is the entire state.
Parameters:
Name | Type | Description |
---|---|---|
state |
StateType | The state of the store. |
Returns:
The state for the container.
- Type
- StateType
updateView()
Updates this container with the current state from the store before updating the view.
(static) initStore(store)
Initializes the store for all containers.
Must be call before any container is inserted into the DOM.
Parameters:
Name | Type | Description |
---|---|---|
store |
Store | The store to use. |