Computer Science

Computer Science

In this section, we explore the world of programming, algorithms, networks, and infrastructure

ProgrammingAlgorithmsComputer NetworksTechnologyInfrastructureSoftware EngineeringHardware Engineering

دسته‌بندی‌های مرتبط

مقالات منتخب

Setting Up Testing in Next.js with Cypress, Jest, Playwright & Vitest – Testing Is Love Made Visible

Testing in Next.js keeps your app safe, fast, and reliable. This article walks through setting up four popular testing tools: Cypress for E2E and component tests, Jest for unit and snapshot tests, Playwright for cross-browser E2E, and Vitest for lightning-fast unit testing. It also includes a recommended testing strategy and CI/CD scripts.

/persian/article-fa/nextjs-testing-setup-cypress-jest-playwright-vitest-ci

Optimizing Third-Party Libraries in Next.js with @next/third-parties – Fast, Flexible, and Easy

@next/third-parties is an experimental library that simplifies and optimizes the integration of popular third-party tools in Next.js.. This article walks through how to use components like GoogleTagManager, GoogleAnalytics, GoogleMapsEmbed, and YouTubeEmbed to improve performance and developer experience across your app.

/persian/article-fa/nextjs-optimize-third-party-libraries-google-tag-analytics-maps-youtube

Using and Optimizing Videos in Next.js – From <video> to Vercel Blob

Next.js supports embedding videos using the <video> tag for self-hosted files and <iframe> for external platforms like YouTube. This article explores best practices for accessibility, streaming with React Suspense, adding subtitles, and hosting videos with Vercel Blob for scalable performance.

/persian/article-fa/nextjs-video-embedding-optimization-self-hosted-vercel-blob-suspense

Caching is the secret to speed and scalability in Next.js

Caching is the secret to speed and scalability in Next.js.. With Cache Components and three powerful directives — use cache, use cache: private, and use cache: remote — you can cache static, personalized, and dynamic shared data with precision. This article explains how to enable caching, use each directive, and compare their behavior.

/persian/article-fa/nextjs-caching-masterclass-use-cache-private-remote-performance

nextjs-font-optimization-next-font-google-local-tailwind

Fonts are the outfit of your page — and next/font makes them fast, secure, and beautiful. With automatic optimization, zero external requests, and no layout shift, next/font lets you load Google or local fonts with ease. This article shows how to use next/font with Tailwind CSS, organize font definitions, preload fonts, and follow best practices.

/persian/article-fa/nextjs-font-optimization-next-font-google-local-tailwind

default.js in Next.js — Graceful Fallbacks for Parallel and Dynamic Routes

In Next.js, the default.js file provides a fallback for Parallel Routes when the active state of a slot cannot be recovered after a full-page load. This article explains how to use default.js, access dynamic route parameters, handle catch-all segments, and generate static paths with generateStaticParams.

/persian/article-fa/nextjs-parallel-routes-default-js-dynamic-segments-catch-all

Managing Errors, Forbidden Access, and Observability in Next.js — Graceful Recovery and Smart Monitoring

nextjs-error-boundary-global-error-forbidden-instrumentation-observability

/persian/article-fa/Managing Errors, Forbidden Access, and Observability in Next.js — Graceful Recovery and Smart Monitoring

instrumentation-client.js and Intercepting Routes in Next.js — Early Monitoring and Smart Navigation

The instrumentation-client.js file in Next.js lets you run monitoring, analytics, and polyfills before your app becomes interactive. Combined with Intercepting Routes, you can display content like modals without changing the page context. This article explains how to use both features with practical examples.

/persian/article-fa/nextjs-instrumentation-client-intercepting-routes-performance-monitoring-modal-navigation

layout.js in Next.js — Structuring Pages with Flexibility and Intelligence

The layout.js file in Next.js defines the structure of your pages. Layouts can be local or root-level and receive props like children and params. This article explains how to use layouts, handle dynamic parameters, integrate with Client Components, and optimize performance through caching and reusability.

/persian/article-fa/nextjs-layout-root-layout-dynamic-params-client-components

loading.js and not-found.js in Next.js — Streaming UI, Instant Feedback, and Graceful 404s

Next.js supports streaming UI with React Suspense using loading.js, and provides graceful error handling with not-found.js and global-not-found.js.. This article explains how to create instant loading states, define custom 404 pages, and optimize user experience and SEO with these special files.

/persian/article-fa/nextjs-loading-not-found-global-not-found-suspense-streaming-ui

page.js in Next.js — Building Dynamic Pages with Route and Search Parameters

The page.js file in Next.js defines the unique UI for a route. It can receive dynamic route parameters (params) and query string parameters (searchParams), and is a Server Component by default. This article explains how to use page.js to build dynamic, filterable, and personalized pages.

/persian/article-fa/nextjs-page-dynamic-params-searchparams-client-server-components

Parallel Routes in Next.js — Rendering Dynamic Pages with Named Slots

Parallel Routes in Next.js allow you to render multiple pages simultaneously or conditionally within the same layout. This is ideal for dynamic sections like dashboards, modals, and tabbed interfaces. This article explains how to define named slots, use default.js for fallbacks, manage modals with intercepting routes, and build independent tab groups.

/persian/article-fa/nextjs-parallel-routes-slots-default-modal-tabs-conditional-layout