• Image placeholder
  • 홈 페이지
  • 블로그 센터
  • 범주
Image placeholder

getServerSideProps

Next.js에서 SSR로 url query 가져오기(feat. typescript)

Next.js 9.3 버전 부터는 이제 pre-rendering을 위한 data-fetching을 위해 사용하던 getInitialProps가 getStaticProps, getServerSideProps, getStaticPaths 세가지로 분리되었다. If you export a function called getStaticProps (Static Site Generation) from ...

getServerSidePropsgetInitialPropsgetStaticPropsgetInitialProps

[Next.js] getServerSideProps / getStaticProps 사용 구분

Next.js는 더 나은 성능과 SEO를 위해 모든 페이지를 미리 렌더링 한다. (Pre-render) 외부 데이터를 서버에서 받아와 초기 데이터로 설정하고 페이지로 전달한다. 페이지 요청 시마다 실행된다. getStaticProps보다 성능이 떨어지지만, 동적으로 데이터를 가져와 업데이트가 가능하다는 장점이 있다. (Dynamic Rendering) 가져온 데이터를 props에 담고 ret...

getStaticPropsgetServerSidePropsgetServerSideProps

© 2022 intrepidgeeks.com

Privacy Policy Contact US Sitemap
🍪 This website uses cookies to ensure you get the best experience on our website. Learn more