Discussion on: How to Learn Next.js in 2020

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