Slide 51
Slide 51 text
Redux Middleware
void Function(
Store store,
LoadGifsAction action,
NextDispatcher next,
) _loadGifs(GifRepository gifRepository) {
return (store, action, next) async {
next(action);
final gifs = await gifRepository.getGifs();
store.dispatch(OnLoadedGifsAction(gifs));
};
}