avatarSjur, August 22, 2020

NEXT.js 9.5

Almost flawless upgrade..


At the end of July next.js 9.5 was released and it was time to see how painless or not it was to upgrade my test blog project (that you are reading now) was. It was first built using next.js 9.4.4 (with a Sanity backend and hosted on Vercel).

NEXT.js 9.5 is out...
NEXT.js 9.5 is out...

To update all I had to do was simply run

npm i next@latest react@latest react-dom@latest

This went smooth. During build the only issue I had was that I had used revalidate

return {
         props: {blog, preview},
         unstable_revalidate: 1
     }
[slug].js

to

return {
         props: {blog, preview},
         revalidate: 1
     }
[slug].js