-
-
Save Waksuu/5b1d89431663733cfb543fb3409500e0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const retrieveMoviesAction = (getAllMovies: () => Promise<MovieDTO[]>): ThunkAction<Promise<void>, | |
AppState, | |
undefined, | |
AppActions | |
> => async (dispatch: ThunkDispatch<AppState, undefined, AppActions>) => { | |
const movies: MovieDTO[] = await getAllMovies(); | |
dispatch(moviesRetrieved(movies)); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment