How to use styled-component in NextJs
Jun 25, 2021
first step create .bablerc file in your root folder and add given below code.
{
“presets”: [“next/babel”],
“plugins”: [[“styled-components”, { “ssr”: true }]],
}
second step is create _document.js file inside pages and paste this code and restart your project and will see a magic.
-__tests__
-components
-pages
-_document.js
-index.js
-public
structure _document.js file like. above examle.
Thank You So Much Coders.