ํ๋ฉด(=ํฌ๋กฌ ๊ฐ๋ฐ์๋๊ตฌconsole์) ์๋์ ๊ฐ์ ์ค๋ฅ๊ฐ ๋ฐ์ํ๋๋ฐใ
ใ
....
client > src > _reducer > index.js์์ ์ด๋ ๊ฒ ํ์๊ณ import { combineReducers } from "redux"; import user from "./user_reducer"; const rootReducer = combineReducers({ user, }); export default rootReducer;client > src > actions > useraction.js์์import axios from "axios"; import { LOGIN_USER } from "./types"; export function loginUser(dataToSubmit) { const request = axios .post("/api/users/login", dataToSubmit) .then((response) => { console.log("๋ก๊ทธ์ธ ํด๋ผ์ด์ธํธ์์ ๋ฐ์", response.data); }); return { type: LOGIN_USER, payload: request, }; } ๊ฒฐ๊ณผ : ๋ก๊ทธ์ธ ํด๋ผ์ด์ธํธ์์ ๋ฐ์ {loginSuccess: true, userId: '634e8e80633fe4fbc226f235'} ์๋ ๊ฒ ๋์ค๋๋ฐ์, Spring,Spring boot,Jquery ๋ง ํ๋ ์ฌ๋์ด๋ผ, ์๋ฌ๋์ค๋ฉด ์ ๋ ๋นํฉ์ค๋ฝ๋ค์.