Advertisement
Guest User

Untitled

a guest
Jan 19th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. export const UPDATE = 'books/UPDATE';
  2.  
  3. export const update = payload => ({
  4. type: actionTypes.UPDATE,
  5. payload,
  6. });
  7.  
  8. export const reducer = (state = {
  9. disabled: true,
  10. loading: false,
  11. visible: true,
  12. }, action) => {
  13. switch (action.type) {
  14. case UPDATE: {
  15. return {
  16. ...action.payload,
  17. };
  18. }
  19. default: {
  20. return state;
  21. }
  22. }
  23. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement