More redux and api work
This commit is contained in:
parent
866e776389
commit
2c67b68512
17 changed files with 256 additions and 11 deletions
22
lib/redux/reducers.dart
Normal file
22
lib/redux/reducers.dart
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import '../models/appState.dart';
|
||||
import 'yourLocationsReducer.dart';
|
||||
import 'loadedReducer.dart';
|
||||
import 'loadingReducer.dart';
|
||||
import 'errorReducer.dart';
|
||||
import 'userIdReducer.dart';
|
||||
import 'userTokenReducer.dart';
|
||||
import 'fireMapReducer.dart';
|
||||
|
||||
// We create the State reducer by combining many smaller reducers into one!
|
||||
AppState appStateReducer(AppState state, action) {
|
||||
|
||||
return AppState(
|
||||
yourLocations: yourLocationsReducer(state.yourLocations, action),
|
||||
userId: userReducer(state.userId, action),
|
||||
token: userTokenReducer(state.token, action),
|
||||
isLoading: loadingReducer(state.isLoading, action),
|
||||
isLoaded: loadedReducer(state.isLoaded, action),
|
||||
error: errorReducer(state.error, action),
|
||||
fireMapState: fireMapReducer(state.fireMapState, action)
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue