This content originally appeared on DEV Community and was authored by Patrick Göler von Ravensburg
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.
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
Hope this helps :)
This content originally appeared on DEV Community and was authored by Patrick Göler von Ravensburg
Patrick Göler von Ravensburg | Sciencx (2021-04-10T19:45:09+00:00) Quick Tip: Take advantage of the official Next.js examples. Retrieved from https://www.scien.cx/2021/04/10/quick-tip-take-advantage-of-the-official-next-js-examples/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.