Skip to content
remjx

Next.js Tips & Tricks

Web Development1 min read

Next.js is my favorite framework for React apps. Here are some tips & tricks I have found useful:

  • Refreshing Next.js Page Data by Adam Boduch. Do you need to refresh page data that is initially populated via getInitialProps or getServerSideProps? This article demonstrates a pattern to solve that issue. In the component, create a state field for the value and use the prop passed from getInitialProps as the default state. Then, use useEffect or other trigger to update the state as needed in the component.

Did you enjoy this post?

Sign up for my newsletter

© 2022 remjx. All rights reserved.