Next.js Guide
Master modern web development with Next.js 14 and beyond in this comprehensive guide.
Προχωρημένες Τεχνικές
API Routes
Build powerful backend APIs with server-side code that's seamlessly integrated into your frontend.
SSG and SSG
Learn the best practices for static site generation and hybrid apps with Next.js.
Τεχνικά Παραδείγματα
pages/api/hello.js
{`export default function handler(req, res) { res.status(200).json({ message: 'Hello from Next.js!' }) }`}
components/DarkMode.js
{`export function useDarkMode() { const [isDark, setIsDark] = useState(false); useEffect(() => { setIsDark(document.documentElement.classList.contains('dark')); }, []); const toggle = () => { setIsDark(!isDark); document.documentElement.classList.toggle('dark'); }; return { isDark, toggle }; }`}