Inflearn Community Q&A
next-redux-saga
Written on
·
629
0
https://github.com/bmealhouse/next-redux-saga
next-redux-saga 기능이 nextjs에서 제공되어서 더이상 사용하지 않아도 된다는것같은데 맞나요??
혹시 그렇다면 next와 redux-saga 연결을 next-redux-saga 설치없이도 할 수 있는것같은데 그러면 둘을 연결하는방법을 어디서 확인해서 할 수 있을까요? next랑 redux-saga공식문서보고해도 잘 모르겠어서 여쭤봅니다.ㅠㅠ
expressnodejsreactreduxNext.js
Answer 2
0
haruharu
Questioner
강좌 순서대로 진행하면서 보려다보니 ch7말고 ch1/front부터 차례대로 봤는데 ch7이 리뉴얼된 최종본인가요??
저는 이전강좌말고 새롭게 리뉴얼된걸로 보고있습니다. 리뉴얼된 강좌에서도 saga 설정은 next-redux-saga로 진행하는걸로 나옵니다.!
haruharu
Questioner
https://github.com/ZeroCho/react-nodebird/blob/master/ch4/front/pages/_app.js
ch4/front/pages/_app.js 입니다
zerocho
Instructor
하필 딱 하나 잘못되어 있던 코드를 보셨네요 ㅠ. 동영상도 확인해보니 옛날 부분이라서 next-redux-saga 설치하는 부분 빼고 재편집 중입니다.
haruharu
Questioner
그래도 빨리 답변해주셔서 감사합니다 ㅎㅎ 다른강의보면 답변도 너무늦고 막막한데 바로바로 해주셔서 너무 좋아요. 그럼 next-redux-saga 설치없이 그냥 아래 코드에서 withReduxSaga 빼고 그냥 진행하면 되는건가요? 아니면 다르게 설정해줘야 하나요?
import React from 'react';
import PropTypes from 'prop-types';
import 'antd/dist/antd.css'; // or 'antd/dist/antd.less'
import Head from 'next/head';
import wrapper from '../store/configureStore';
import withReduxSaga from 'next-redux-saga';
const App = ({ Component }) => {
return (
<>
<Head>
<title>Nextest</title>
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
</Head>
<Component />
</>
);
};
App.propTypes = {
Component: PropTypes.elementType.isRequired,
};
export default wrapper.withRedux(withReduxSaga(App));






ch1/front부터 코드 봤는데 넥스트리덕스사가 쓰는 코드가 없어서요. 어디서 보신건가요? saga 강좌 부분은 리뉴얼 전에서 그대로 가져온겁니다.