인프런 커뮤니티 질문&답변
type error 가뜨는데 원인을 잘 모르겠어요.
작성
·
311
0
로그인 버튼 클릭 시 아래 오류가 뜨는데 어디가 문제일까요.?
index.js:43 은 입니다.
ㅡㅡㅡㅡ
useForm.js:751 TypeError: Cannot read property 'type' of undefined
at rootReducer (index.js:43)
at LoginForm.js:24
at onFinish (Form.js:77)
at useForm.js:748
ㅡㅡㅡㅡ
퀴즈
리덕스의 주요 목적은 무엇인가요?
React 컴포넌트 라이프사이클 관리
서버와의 비동기 통신 최적화
애플리케이션 상태 중앙 집중 관리
UI 렌더링 성능 향상
답변 4
1
선생님 해결했습니다.. 액션을 가져올 때 { } 없이 그냥 가져와서 오류가 난 것 같아요.
import { loginAction } from "../reducers/index";
0
0
+ 추가로 콘솔창에 이런 오류가 떠있는데 무시하면되는걸까요?
Warning: Prop `className` did not match. Server: "ant-input-search sc-AxmLO bcIYUP ant-input-search-enter-button ant-input-group-wrapper" Client: "ant-input-search sc-AxiKw ljUZQI ant-input-search-enter-button ant-input-group-wrapper"
in span (created by ClearableLabeledInput)
in ClearableLabeledInput (created by Context.Consumer)
in Input (created by Context.Consumer)
in Search (created by Styled(Search))
in Styled(Search) (at AppLayout.js:30)
in li (created by MenuItem)
in MenuItem (created by Connect(MenuItem))
in Connect(MenuItem) (created by Trigger)
in Trigger (created by ForwardRef(Tooltip))
in ForwardRef(Tooltip) (created by Tooltip)
in Tooltip (created by Context.Consumer)
in MenuItem (at AppLayout.js:29)
in ul (created by DOMWrap)
in DOMWrap (created by SubPopupMenu)
in SubPopupMenu (created by Connect(SubPopupMenu))
in Connect(SubPopupMenu) (created by Menu)
in Provider (created by Menu)
in Menu (created by Context.Consumer)
in InternalMenu (created by Context.Consumer)
in Menu (at AppLayout.js:18)
in div (at AppLayout.js:17)
in AppLayout (at pages/index.js:11)
in Home (at _app.js:14)
in NodeBird (created by withRedux(NodeBird))
in Provider (created by withRedux(NodeBird))
in withRedux(NodeBird)
in ErrorBoundary (created by ReactDevOverlay)
in ReactDevOverlay (created by Container)
in Container (created by AppContainer)
in AppContainer
in Root
0




