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
I have an AppState and a nested MenuState.
Actions on the AppState trigger the reducer and that then triggers the UI to update.
Actions on the nested MenuState trigger the nested reducer BUT do not trigger the UI to update.
Is this a bug or am I doing something wrong?
If there is nothing obvious in my following code, would you be so kind and provide an example with a nested action and reducer that actually triggers an update using the flutter_built_reduxStoreConnection?
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel dev, v0.5.4, on Microsoft Windows [Version 10.0.17134.112], locale en-NZ)
[√] Android toolchain - develop for Android devices (Android SDK 26.0.2)
[√] Android Studio (version 3.1)
[√] IntelliJ IDEA Community Edition (version 2017.3)
final appReducerBuilder =newReducerBuilder<AppState, AppStateBuilder>()
..add(AppActionsNames.shopsLoadedSuccessAction, shopsLoadedSuccess)
..combineNested<MenuState, MenuStateBuilder>(menuReducerBuilder);
menu_reducer
final menuReducerBuilder =newNestedReducerBuilder<AppState, AppStateBuilder, MenuState, MenuStateBuilder>(
(s) => s.menuState,
(b) => b.menuState) // maps from the main state object to the nested state
..add(MenuActionsNames.menuItemsLoadedSuccessAction, menuItemsLoadedSuccess);
voidmenuItemsLoadedSuccess(MenuState state, Action<BuiltList<MenuItem>> action,
MenuStateBuilder builder) {
builder.menuItems.replace(action.payload);
}
Hi
I have an AppState and a nested MenuState.
Actions on the AppState trigger the reducer and that then triggers the UI to update.
Actions on the nested MenuState trigger the nested reducer BUT do not trigger the UI to update.
Is this a bug or am I doing something wrong?
If there is nothing obvious in my following code, would you be so kind and provide an example with a nested action and reducer that actually triggers an update using the
flutter_built_redux
StoreConnection
?store
middleware
app_state
menu_state
menu_item
app_actions
menu_actions
app_reducer
menu_reducer
menu_widget
The text was updated successfully, but these errors were encountered: