Last active
October 7, 2018 09:15
-
-
Save productioncoder/1c75676b7ce87542b856805842a50c37 to your computer and use it in GitHub Desktop.
Youtube API reducer
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
import {YOUTUBE_LIBRARY_LOADED} from '../actions/api'; | |
const initialState = { | |
libraryLoaded: false, | |
}; | |
export default function (state = initialState, action) { | |
switch (action.type) { | |
case YOUTUBE_LIBRARY_LOADED: | |
return { | |
libraryLoaded: true, | |
}; | |
default: | |
return state; | |
} | |
} | |
export const getYoutubeLibraryLoaded = (state) => state.api.libraryLoaded; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment