You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add redux state management. Once done, we should be able to create a component like this
export class MyComponentWithEveesAndStore extends stateConnect(LitElement)) {
stateChanged(state) {...}
goToSection(id: string) {
access to this.evees.client
access to this.store.dispatch(goToSection(id));
}
}
For components that render one evee, we should also be able to do like this:
export class MyComponentWithEveesAndStore extends AppEveesBaseElement<Section>)) {
stateChanged(state) {...}
dataUpdated() {...}
goToSection(id: string) {
access to this.evees.client
access to this.store.dispatch(goToSection(id));
}
}
The AppEveesBaseElement class should extend the EveesBaseElement to handle the client state, and include the app redux store too.
Note that our app state will be split in two: the redux state for app-specific state like the selected page, the status of some components, a snack bar, etc. But all the content-related state will be in the Client (this.evees.client...) service.
For this, we can create another HTML container element (similar to evees-container) that will send the store to the components using DOM events. The stateConnect() mixin will take care of injecting the store and the evees service and will replace and include the eveesConnect() mixin.
The text was updated successfully, but these errors were encountered:
pepoospina
changed the title
StateManagement mixin
Add Redux StateManagement
Jan 27, 2021
Add redux state management. Once done, we should be able to create a component like this
For components that render one evee, we should also be able to do like this:
The
AppEveesBaseElement
class should extend theEveesBaseElement
to handle the client state, and include the app redux store too.Note that our app state will be split in two: the redux state for app-specific state like the selected page, the status of some components, a snack bar, etc. But all the content-related state will be in the Client (
this.evees.client...
) service.For this, we can create another HTML container element (similar to evees-container) that will send the store to the components using DOM events. The
stateConnect()
mixin will take care of injecting the store and the evees service and will replace and include the eveesConnect() mixin.The text was updated successfully, but these errors were encountered: