DEV Community

loading...

How to combine Next.js, styled components and TypeScript

Tom
Lazy developer by day, sleeping by night
・1 min read

Next.js provides a handy example of how to add Styled components to your project: https://github.com/vercel/next.js/tree/master/examples/with-styled-components.

However, it's in JavaScript, not in TypeScript. The crux is in _document.tsx of which I've made a typed example in this Github gist.

Discussion (0)