Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next.js Pre-rendering and Data Fetching #107

Closed
TaehwanGo opened this issue Nov 9, 2021 · 3 comments
Closed

Next.js Pre-rendering and Data Fetching #107

TaehwanGo opened this issue Nov 9, 2021 · 3 comments
Assignees

Comments

@TaehwanGo
Copy link
Member

TaehwanGo commented Nov 9, 2021

shallow option을 router에 추가하는 것과 추가하지 않는 것은 어떤 차이가 있나요?
찾아보니 getServerSideProps에서 data-fetching하는 것을 하지 않고도 url을 변경할 수 있다고 하는데
이것을 만약에 제가 만들고 있던 CourseLayout.tsx에 적용하고
useEffect로 가져오던 데이터를 getServerSideProps로 가져오게 한 다음
url 이동시 사용하는 router.push()에 { shallow: true}를 전달하면
리덕스로 매번 페이지 변경 시 마다 요청하던 것이 없어질 수도 있을 것 같네요
적용해보고 코멘트 남길게요 🙂

Originally posted by @TaehwanGo in #106 (comment)

/ / *********************************************************************************************************

처음에 데이터를 dispatch하는 것을 getServerSideProps로 가져올 수 있는 방법이 있는지 알아보기
없다면 이번 version 12로 올려서 확인해보기

@TaehwanGo TaehwanGo added this to To do in Inflearn-front via automation Nov 9, 2021
@TaehwanGo TaehwanGo self-assigned this Nov 9, 2021
@TaehwanGo
Copy link
Member Author

@TaehwanGo
Copy link
Member Author

Next.js 12 버전의 React Server Components

image

문제점1 : React 18버전이 필요하지만 material UI의 dependency 조건과 맞지 않아 설치 불가능

-> React 18버전 정식 출시 및 material UI 버전 올린 뒤 다시 시도할 예정

문제점2 : Typescript에서 아직 지원이 안되는 것으로 보임

  • ts파일로 만들 경우 jsx 문법 사용 불가능

Inflearn-front automation moved this from To do to Done Nov 12, 2021
@TaehwanGo
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants