DEV Community

Arunoda Susiripala
Arunoda Susiripala

Posted on

How to Learn Next.js in 2020

Hey, I'm Arunoda(a former Next.js maintainer) & here's how my proposal to learn Next.js in 2020. This path is created for someone who has limited time to learn.

You will find many issues while building your Next.js app. Search for them on Google. If you didn't find something, maybe you are doing something wrong, or that's a known issue.

In either case, ask questions on Stackoverflow & Next.js discussions.

Reality 🤯

Let's talk about reality. You cannot do this in a few hours. Depending on your prior experience, it'll take a week or a month.

If you are new to web development, it will take up to a few months.

Happy Learning! 🔥

Top comments (8)

Collapse
 
prashanth1k profile image
Prashanth Krishnamurthy

Thanks, @arunoda !

Just wanted to jump in and give a quick shout-out about all your work for Meteor / Storybook/ Next (though I don't quite use them actively). Looking forward to what you create post Vercel :)

Collapse
 
arunoda profile image
Arunoda Susiripala
Collapse
 
ombratteng profile image
Ole-Martin Bratteng • Edited

All I want to know is, how can I check for a cookie and then set a class on the body, based on the cookie, server side.

Collapse
 
arunoda profile image
Arunoda Susiripala

You can do that inside getServerSideProps. Basically you have access to the request object. Then get the cookie. After that return it as a prop.

Collapse
 
ombratteng profile image
Ole-Martin Bratteng

Is that available in _document.js? That's where I want to set the class of <body>.
So that the html sent from the server, either has <body class="dark-mode"> or <body class="light-mode">

Thread Thread
 
nimitwalia89 profile image
nimit walia

U can access it from getInitialProps inside _document

Collapse
 
andrewbaisden profile image
Andrew Baisden

Next is quite easy to learn if you already know React.

Collapse
 
skkrishn1 profile image
Suresh Kumar K

This is mind blowing...really helpful to learn next js