Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Youtube: watch details reducer: quick and dirty implementation
function reduceWatchDetails(responses, prevState) {
let byIdEntry = {};
if (responses && responses[0].result.items) {
const video = responses[0].result.items[0];
byIdEntry = {[]: video};
return {
byId: {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.