본문 바로가기

NEXT28

next+ts Redux index 전체 코드 둘러보기(마지막) store/index.ts import { applyMiddleware, createStore, EmptyObject, Middleware, Store, StoreEnhancer, } from "redux"; import reducers from "./reducers"; import { MakeStore, createWrapper } from "next-redux-wrapper"; import createSagaMiddleware from "redux-saga"; import { ActionProps, CounterState } from "./types/state"; import { configureStore } from "@reduxjs/toolkit"; import { initialState } fr.. 2022. 5. 12.
next+ts Redux reducer SAGA전체 코드 둘러보기 LoginSaga import axios from "axios"; import { resolveSoa } from "dns"; import { NextRouter } from "next/router"; import { call, getContext, 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.g.. 2022. 5. 11.
next+ts Redux reducer(SAGA제외) 전체 코드 둘러보기 data import axios from "axios"; import { useRouter } from "next/router"; import { useEffect } from "react"; import data from "."; import { da } from "../../type"; import { Delete, Increase, LOGIN_FAIL, LOGIN_PENDING, LOGIN_SUCCESS, LOGOUT, Update, } from "../actions/actionTypes"; import { ActionProps, CounterState, LoginData } from "../types/state"; export const initialState: CounterState = { da.. 2022. 5. 9.
next+ts Redux action 전체 코드 둘러보기 action import { NextRouter } from "next/router"; import { da } from "../../type"; import { LoginData } from "../types/state"; import { Delete, Increase, LOGIN_FAIL, LOGIN_PENDING, LOGIN_SUCCESS, LOGOUT, Update, } from "./actionTypes"; export const dataadd = (payload: da | undefined) => { return { type: Increase, payload, }; }; export const datadel = (payload: String | undefined) => { return { ty.. 2022. 5. 8.