Next link 서버사이드렌더링 질문
미해결
[리뉴얼] React로 NodeBird SNS 만들기
안녕하세요! 강의를 응용해서 블로그를 만들어보고 있는데요! <a href="/">Home</a> <Link href="/" ><a>Home<a/></Link> a태그를 이용해 이동 할 경우, 아래 getServerSideProps가 잘 작동하여, 데이터가 채워지는데, Link를 이용해 이동 할 경우 데이터가 채워지지 않습니다. export const getServerSideProps = wrapper.getServerSideProps(async (context) => { const cookie = context.req ? context.req.headers.cookie : ''; axios.defaults.headers.Cookie = ''; if (context.req && cookie) { axios.defaults.headers.Cookie = cookie; } context.store.dispatch({ type: LOAD_MY_INFO_REQUEST, }) context.store.dispatch({ type: LOAD_POSTS_REQUEST, }); context.store.dispatch(END); await context.store.sagaTask.toPromise(); }); 새로고침이 되지 않으면 데이터가 채워지지 않는 것 같은데, 몇일 간 관련 자료를 찾아보아도 이런 경우가 없는 것 같아 질문드립니다..
- NextLink
- react
- refreshPage
- getserversideprops
- nodejs
- express
- ServersideRendering
- redux
- Next.js





