React & Next.js

Building with React and Next.js

React & Next.js

All gettemplate templates are built with React and optimized for Next.js.

Why Next.js?

  • ⚑ Fast page loads with SSR/SSG
  • πŸ“ File-based routing
  • πŸ–ΌοΈ Image optimization
  • πŸ”§ API routes built-in
  • πŸš€ Easy deployment

Version Requirements

{
  "react": "^18.0.0",
  "react-dom": "^18.0.0",
  "next": "^14.0.0"
}

App Router vs Pages Router

Our templates work with both:

Pages Router (Traditional)

pages/
β”œβ”€β”€ index.js
β”œβ”€β”€ about.js
└── _app.js

App Router (New)

app/
β”œβ”€β”€ page.js
β”œβ”€β”€ about/page.js
└── layout.js

Best Practices

1.Use Server Components where possible
2.Implement proper loading states
3.Optimize images with next/image
4.Use dynamic imports for heavy components