Inflearn Community Q&A
redux 예제코드 가져와서 강의 보면서 따라하는데
Resolved
Written on
·
241
1
//tsconfig.json strict:true 일때
const store = createStore(reducer, initialState, enhancer);
해당 부분에서 에러가 사라지지 않아서 createStore를 보니까

Argument of type '{ user: { isLoggingIn: boolean; loading: boolean; data: null; }; posts: never[]; }' is not assignable to parameter of type '{ user?: undefined; posts?: undefined; }'.
Types of property 'user' are incompatible.
Type '{ isLoggingIn: boolean; loading: boolean; data: null; }' is not assignable to type 'undefined'.ts(2345)
에러 메세지
user와 posts State가 never로 추론 되어지네요.
tsconfig.json 파일에서 strict: false로 바꾸면 정상적으로 추론 됩니다.
//tsconfig.json strcit: false일때

typescript
Quiz
41% of people got it wrong. Give it a try!
Redux 라이브러리의 가장 핵심적인 목적은 무엇일까요?
애플리케이션 UI 스타일링
서버 측 데이터베이스 관리
애플리케이션 상태 중앙 관리
네트워크 요청 자동화






넵 알겠습니다. 해결 해보겠습니다