next+ts30 next+ts 16일차 login saga비동기 처리 오늘은 Saga비동기 처리중에 간단한 오류를 엄청 고민하고 겨우 해결했습니다. LoginSaga import axios from "axios"; import { call, put, takeEvery, takeLatest } from "redux-saga/effects"; import { LOGIN_PENDING, LOGIN_SUCCESS } from "../actions/actionTypes"; import { LoginData, LoginJson } from "../types/state"; const checkdata = async () => { const res = await axios.get( "https://raw.githubusercontent.com/qjawns0222/caremaker/nex.. 2022. 4. 28. next+ts15일차 Saga Login페이지 유튜브: https://www.youtube.com/watch?v=7yLiEJ9MXlw 깃허브: https://github.com/qjawns0222/caremaker/tree/next+ts-15%EC%9D%BC%EC%B0%A8-Saga-login 오늘은 Login페이지 만들고 Saga랑 createstore 대신 configureStore을 사용했습니다. action actiontypes reducers/loginsaga /reducer/Sagas/index Saga관련 함수들은 function*로 해주어야됩니다. Login을 호출하면 type으로 Login_PENDING으로 넘겨주고 그걸로 인해서 관련된 action 이 실행되고 takeLatest로묶어준 checklogin으로 넘어가게 됩니다. 그리.. 2022. 4. 27. next+ts14차 del+mypage 유튜브:https://www.youtube.com/watch?v=dDPPBFPUWfY 깃허브: https://github.com/qjawns0222/caremaker/tree/next+ts14%EC%9D%BC%EC%B0%A8 오늘은 axios 공부 하고 삭제 버튼과 마이페이지 버튼에 데이터 넣어줬습니다. container부분 component부분 import { NextPage } from "next"; import Link from "next/link"; import { MouseEventHandler } from "react"; import { CounterState } from "../store/types/state"; import { da } from "../type"; const MyPage =.. 2022. 4. 26. next+ts13일차 ref를 이용한 데이터 삽입 container/form/firstform/index.tsx import { useRef } from "react"; import { useSelector } from "react-redux"; import { useDispatch } from "react-redux"; import Index from "../../../components/form/firstform/index"; import { dataadd } from "../../../store/actions/action"; import { RootState } from "../../../store/reducers"; import { CounterState } from "../../../store/types/state"; import { da } .. 2022. 4. 25. 이전 1 2 3 4 5 6 7 8 다음