React/Next.js

[Next.js] Next.js + Redux + TypeScript 사용중 state값 proxy로 나올때 해결법

박헹구 2022. 2. 17. 22:19
반응형

 

import { current } from '@reduxjs/toolkit'



...

   extraReducers: (builder) => {
        builder.addCase(logIn.fulfilled, (state, action) => {
            console.log(current(state))
        });
    },

console.log(state)했을 때 proxy값으로 나오면 import {current} 해서 아래처럼 입력해주면 값이 제대로 나온다. 

반응형