participants.js 352 B

123456789101112131415161718
  1. export const REPLACE_PARTICIPANTS = 'REPLACE_PARTICIPANTS';
  2. export function replace(newState) {
  3. return {
  4. type: REPLACE_PARTICIPANTS,
  5. state: newState
  6. };
  7. }
  8. export default function participants(state=[], action=null) {
  9. switch (action.type) {
  10. case REPLACE_PARTICIPANTS:
  11. return action.state;
  12. default:
  13. return state;
  14. }
  15. }