React 19 đưa ra cách làm “trơn tru” hơn cho các tác vụ async như:
Concurrent Rendering (render đồng thời / render có thể bị ngắt) là chế độ React có thể bắt đầu render một phiên bản UI mới, tạm dừng nếu có việc quan trọng hơn (gõ phím, click), rồi tiếp tục hoặc bỏ công việc cũ — thay v
React Fiber is a complete rewrite of React's reconciliation algorithm, introduced in React 16. It improves the rendering process by breaking down rendering work into smaller units, allowing React to pause and resume work
Redux là một thư viện quản lý state (trạng thái) phổ biến cho ứng dụng JavaScript, đặc biệt là với React. Redux giúp bạn lưu trữ và quản lý trạng thái toàn cục của ứng dụng một cách nhất quán, dễ kiểm soát và dễ debug.
Zustand là một thư viện quản lý trạng thái (state management) cho React, được tạo ra bởi Poimandres. Tên "Zustand" trong tiếng Đức có nghĩa là "trạng thái". Triết lý của nó là cung cấp một giải pháp nhỏ, nhanh, và không
Định nghĩa: Context API là một tính năng của React cho phép bạn truyền dữ liệu qua cây component mà không cần phải truyền props thủ công qua từng cấp.
Định nghĩa: Custom Hooks là những JavaScript functions có tên bắt đầu bằng "use" và có thể gọi các Hooks khác bên trong. Chúng cho phép bạn tái sử dụng stateful logic giữa các component mà không cần thay đổi cấu trúc com
Định nghĩa: Hook dùng để thêm state (trạng thái) vào functional component. Trả về một mảng gồm giá trị hiện tại và hàm setter để cập nhật giá trị đó.
Trong Class Component, vòng đời được chia thành 3 giai đoạn chính:
Trong React, Component giống như những khối xây dựng độc lập và có thể tái sử dụng để tạo nên giao diện người dùng (UI). Mỗi component quản lý một phần giao diện và logic của riêng nó. Thay vì xây dựng toàn bộ UI trong m
Reconciliation in React is the process through which React updates the DOM to match the virtual DOM. When a component's state or props change, React creates a new virtual DOM tree and compares it with the previous one. T
Both Debounce and Throttle are techniques used in JavaScript to improve performance by limiting the number of times a function is executed. They are essential when dealing with events that fire rapidly, such as scrolling
Tác giả: @Tranloi2k
Tác giả: @Tranloi2k
Tác giả: @Tranloi2k
Định nghĩa:
Tác giả: @Tranloi2k
Tác giả: @Tranloi2k
In web development, rendering timing refers to the measurement and breakdown of the steps a browser takes to convert your code (HTML, CSS, and JavaScript) into the actual pixels displayed on a user's screen.
SEO (Search Engine Optimization) là tập hợp các kỹ thuật giúp công cụ tìm kiếm hiểu và xếp hạng trang web của bạn tốt hơn. Việc tối ưu SEO bao gồm on-page SEO và technical SEO, cũng như performance optimization và user e
Phần ngắn về <Link và prefetch. Hướng dẫn đầy đủ routing, layout, searchParams, error.tsx → 1. App Router — Chi tiết.
Giải thích tại sao Nova có hai hệ auth (NextAuth + JWT NestJS), cách authFetch / refresh hoạt động, và so sánh best practice.
Cấu hình Auth.js / NextAuth v5 trong Nova Shop: file structure, providers, callbacks, session JWT.
Nền tảng xác thực (AuthN) và phân quyền (AuthZ) trước khi đọc 8. NextAuth v5 và 9. JWT Dual Auth.
Tài liệu giải thích middleware.ts — chạy trước khi request tới page, dùng cho auth gate, redirect, và tích hợp NextAuth v5.
Tài liệu này giải thích cách Next.js lấy và cache dữ liệu trong App Router, và cách Nova Shop áp dụng (revalidateTag, revalidatePath, refresh()).
Tài liệu giải thích app/api//route.ts — tạo API HTTP trong Next.js (checkout Stripe, webhook, NextAuth).
Tài liệu giải thích Server Functions / Server Actions — gọi hàm server từ form hoặc client không cần tự viết /api/... cho mọi mutation.
Tài liệu giải thích hai loại component trong App Router, khi nào dùng loại nào, và cách Nova Shop tách products/page.tsx (server) vs productForm (client).
Tài liệu ghép mọi chủ đề (routing, RSC, actions, API, cache, auth) thành lộ trình đọc code thực tế Nova-online-shopping.
Tài liệu giải thích cách Next.js 15 map URL → file trong app/, và cách Nova Shop tổ chức route shop, checkout, API.
Tài liệu này đánh giá mức độ bao phủ lý thuyết chuẩn của bộ ghi chú trong folder NextJS/, liệt kê khoảng trống, và so sánh best practice theo Next.js Docs với cách làm trong Nova Shop.
TypeScript adds a powerful layer of type safety to JavaScript. Here is a breakdown of the core concepts you’ll encounter in interviews and daily development.
In TypeScript, Generics are essentially "variables for types." They allow you to write code that is flexible enough to work with many different types while still maintaining strict type safety.
Optimized tool selectionHere are concise explanations for each concept in JavaScript:
In JavaScript, almost every object has a hidden property called [[Prototype]] (accessible in most browsers via proto).
A closure is a function that "remembers" the scope where it was created, allowing it to access variables from its parent function even after the parent has finished execution.
!Ảnh minh họa
Covers: Prototypes & this · Event Loop & Concurrency · Memory & Performance
How WebAssembly runs side by side with JavaScript inside the very same engine — what it's good for, and where the boundary between the two costs you.
"JavaScript is single-threaded" is true in a precise and limited sense — your code runs on one thread, but the engine and host quietly use many.
How JavaScript code gets split across files, linked together, and loaded — and why ES Modules behave differently from the older CommonJS in ways that actually matter.
The engine runs the language; the host provides the APIs you actually build with. Keeping this line clear explains a surprising amount about portability.
How a single-threaded language manages to handle timers, network requests, and file I/O all at once without ever blocking.
How V8 automatically figures out which memory is no longer needed and reclaims it — and why modern GC manages to do this without freezing your program.
Where JavaScript data actually lives — the split between stack and heap, how V8 organizes its heap into generations, and what a "memory leak" even means in a garbage-collected language.
How JavaScript decides which variable a name refers to across nested functions, and how closures keep variables alive long after the function that created them has returned.
The internal environment a piece of JavaScript runs inside — the concept that explains hoisting, the temporal dead zone, this, and the call stack all at once.
What happens the moment the JIT's optimistic assumptions break — and why the truly expensive thing isn't a single deopt but a deopt loop.
How V8 represents arrays through "elements kinds," why packed integer arrays are the fastest thing going, and how a single careless line can permanently slow an array down.
How V8 physically stores an object's properties, what keeps an object on the fast path, and what quietly drops it onto the slow one.
The mechanism that makes a repeated obj.x fast by remembering, right at that spot in the code, where x was found last time.
How V8 gives dynamic, dictionary-like objects the same fast, struct-style property access you'd expect from a statically typed language.
V8's optimizing compiler: it turns hot bytecode plus type feedback into fast native machine code — and gracefully unwinds when its assumptions turn out to be wrong.
V8's baseline tier: it turns the AST into compact bytecode, runs it, and quietly gathers the profiling data that makes everything faster later.
How raw source text becomes a structured tree the engine can execute — and why this stage quietly shapes your app's startup time.
How a JavaScript engine (primarily V8) stores values in memory, and why that single design decision ripples through everything else.
CORS stands for Cross-Origin Resource Sharing. It is a security mechanism implemented by web browsers to prevent a malicious website from accessing data from another website without permission.
In TypeScript, these three types represent different levels of "restriction." Understanding the difference is crucial for maintaining type safety while handling dynamic data.
State Pattern (Mẫu thiết kế trạng thái) là một mẫu thiết kế hành vi (behavioral pattern) cho phép một đối tượng thay đổi hành vi của mình khi trạng thái nội bộ thay đổi. Đối tượng sẽ xuất hiện như thể nó được thay đổi cl
Singleton Pattern (Mẫu thiết kế Singleton) là một mẫu thiết kế thuộc nhóm creational (tạo sinh).
Observer Pattern (Mẫu thiết kế Observer/Quan sát viên) là một mẫu thiết kế hành vi (behavioral pattern).
Dưới đây là thông tin đã được xác minh về Factory Pattern trong JavaScript, dựa trên các nguồn uy tín như MDN Web Docs, Refactoring Guru - Factory Method, và Addy Osmani - Learning JavaScript Design Patterns.
Việc chọn nơi lưu trữ access token là một quyết định quan trọng, ảnh hưởng trực tiếp đến bảo mật của ứng dụng web. Dưới đây là so sánh chi tiết giữa ba phương pháp phổ biến.
Bộ nguyên lý thiết kế hướng đối tượng giúp code dễ bảo trì và mở rộng.
So sánh nhanh hai kiểu thiết kế API và khi nào nên dùng mỗi loại.
Cách đọc độ phức tạp thời gian/không gian và vì sao nó quan trọng.