CodeNewbie Community 🌱

Patrick Goeler von Ravensburg
Patrick Goeler von Ravensburg

Posted on • Originally published at codingcastle.dev

Quick Tip: Take advantage of the official Next.js examples

Have you ever spent too much time trying to set something up with Next.js? Hopefully this quick tip can help you in the future.

The Next.js repository contains one of the most extensive collections of examples I have seen.

Next.js Examples

So if you are trying to integrate your favorite UI or data fetching library with Next.js there is a good chance they have an example for that already.

This helped me a ton when I was trying to setup server side data fetching with Apollo GraphQL for the first time.

All the examples seem well-maintained too, e.g. the Tailwind example was updated to use the new JIT compiler which is a rather new change.

You can make use of this by copying the code you need or you can create a new Next.js project with an example as the template.

npx create-next-app --example with-tailwindcss with-tailwindcss-app
# or
yarn create next-app --example with-tailwindcss with-tailwindcss-app
Enter fullscreen mode Exit fullscreen mode

Hope this helps :)

Youtube | Twitter

Top comments (1)

Collapse
 
simon23800 profile image
simon23800

I spent a lot of time learning code entries and JS examples and I think you really need a proper course for this. The resumesplanet review has some new courses from which you can take advantage.