Skip to content

Instantly share code, notes, and snippets.

@itaditya
Created September 28, 2020 04:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itaditya/1c0ab2733b214d891eeb6d69bfbe700b to your computer and use it in GitHub Desktop.
Save itaditya/1c0ab2733b214d891eeb6d69bfbe700b to your computer and use it in GitHub Desktop.
(Blog) Build a Redux hooked app
function selectorMenu(state) {
const { diet, menuIdList, menuById } = state;
const menuId = menuIdList[diet];
const menuList = [];
menuId.forEach((id) => {
menuList.push(menuById[id]);
});
return menuList;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment