• This project
    • Loading...
  • Sign in

서민정 / SEARCH-AND-CHAT

%ea%b7%b8%eb%a6%bc1
Go to a project
Toggle navigation Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 2
  • Merge Requests 0
  • Wiki
  • Snippets
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • oss-chatbot
  • client
  • src
  • _reducers
  • message_reducer.js
  • 서민정's avatar
    occur error about Card component and map function · 8a037754
    8a037754
    서민정 authored 2020-05-20 01:09:22 +0900
message_reducer.js 386 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
import {
    SAVE_MESSAGE,
} from '../_actions/types';

//비어있는 message array에 넣을 것
export default function (state = {messages:[]}, action) {
    switch (action.type) {
        case SAVE_MESSAGE:
            return {
                ...state,
                messages: state.messages.concat(action.payload)
            }
        default:
            return state;
    }
}