Update store template to switch on action.type