Fantastic Note Documentation

website·Indexed 30 days ago

https://fantastic-note.vercel.app

A comprehensive collection of technical notes and guides covering frontend development. Includes deep dives into React (Fiber architecture, JSX, React.memo, and performance optimization), Vue 3 (Composition API, reactivity, and built-in components), V8 engine internals (Hidden Classes, Inline Caching, and d8 debugging), and general software engineering topics like Git and Next.js Hydration.

Tokens
328.5K
Snippets
1.4K
Records
2K
Agent score
75%

What's inside Fantastic Note

  1. Overview of Legacy React Lifecycle Methods (Pre-React 16)

    Before React 16, class components followed a three-stage lifecycle: Mounting, Updating, and Unmounting. Several of these methods (marked as unsafe) were later deprecated to support asynchronous rendering (Concurrent Rendering) and the Fiber reconciler.
    // Mounting
    constructor()
    componentWillMount() // ⚠️ Deprecated
    render()
    componentDidMount()
    
    // Updating
    componentWillReceiveProps(nextProps) // ⚠️ Deprecated
    shouldComponentUpdate(nextProps, nextState)
    componentWillUpdate() // ⚠️ Deprecated
    render()
    componentDidUpdate(prevProps, prevState)
    
    // Unmounting
    componentWillUnmount()
  2. Overview of Dockerfile and Image Customization

    A Dockerfile is a text file containing all the instructions needed to build a Docker image. It guides Docker to create a custom image by defining a series of commands and parameters. Every instruction executed in a Dockerfile creates a new layer in the image; to prevent image bloat, multiple commands should be combined using the && operator.
    FROM nginx
    RUN echo 'This is a locally built nginx image' > /usr/share/nginx/html/index.html
  3. Overview of React.useTransition

    useTransition is a Concurrent Feature hook introduced in React 18. It allows developers to mark specific state updates as "transitions" (low priority). This prevents non-urgent updates—such as filtering a large list or switching tabs—from blocking high-priority tasks like user input or animations, ensuring the UI remains fluid and responsive.
  4. Overview of JavaScript Binary Data Interfaces

    JavaScript provides three primary objects for handling binary data, collectively referred to as binary arrays. These are essential for high-performance tasks like WebGL, where data must be exchanged with hardware (e.g., GPUs) in binary format rather than text.

    • ArrayBuffer: Represents a raw segment of memory. It cannot be read or written to directly; it requires a 'view'.
    • TypedArray: Views used to read/write simple, uniform data types (e.g., all 8-bit integers). There are 9 different TypedArray types.
    • DataView: A flexible view used to read/write complex, mixed-format binary data (e.g., a mix of 8-bit and 32-bit values) and allows custom byte-order specification.
  5. Overview of the V8 Engine

    V8 is a high-performance, open-source JavaScript and WebAssembly engine written in C++ by Google. It is used in environments like Chrome and Node.js. V8 implements the ECMAScript and WebAssembly specifications and is compatible with Windows 7+, macOS 10.12+, and Linux (x64, IA-32, ARM, or MIPS). Its primary responsibilities include:

    1. Compiling and executing JavaScript code and managing the call stack.
    2. Memory allocation.
    3. Garbage collection.
  6. Overview of React Fiber Architecture

    Fiber is a rewrite of the React core reconciliation algorithm designed to achieve 'incremental rendering'. It allows React to break a large rendering task into smaller units of work and spread them across multiple frames.

    Fiber serves three roles:

    1. Architectural: A rewrite of the reconciliation process.
    2. Data Structure: The unit of the Fiber tree (the new 'Virtual DOM' node in React 16+), which stores component state and effects.
    3. Workflow: A single unit of work.
  7. Introduction to ES6 Proxy

    The Proxy object allows you to create a wrapper around a target object to intercept and redefine fundamental operations (like property lookup, assignment, enumeration, function invocation, etc.). This acts as a filtering or modification layer between the external code and the target object. To trigger the interception, operations must be performed on the Proxy instance, not the original target object.
    /**
     * @param target The object to be wrapped
     * @param handler An object defining the traps for intercepting operations
     */
    let proxy = new Proxy(target, handler);
  8. Overview of the Reflect API

    The Reflect object provides methods for intercepting JavaScript operations. It serves several purposes:

    1. Consolidation: Moves internal language methods (like Object.defineProperty) to a single Reflect object.
    2. Improved Return Values: Returns booleans instead of throwing errors in certain cases (e.g., Reflect.defineProperty returns false on failure, whereas Object.defineProperty throws an error).
    3. Functional Interface: Converts imperative operations (like the in operator or delete keyword) into function calls.
    4. Proxy Compatibility: Its methods map one-to-one with Proxy handler methods.
  9. Overview of Express.js framework

    Express is a fast, simple, and minimalist web application framework for Node.js. It provides basic web development functionality and extends the native Node.js http module without abstracting it away; specifically, the request object inherits from http.IncomingMessage and the response object inherits from http.ServerResponse. It is suitable for building API services, traditional websites, and developer tool integrations.
  10. Overview of the V8 JavaScript Engine

    V8 is an open-source JavaScript engine developed by Google, used primarily in the Chrome browser and Node.js. It functions as a virtual machine (VM) that simulates a physical computer's CPU, stack, and registers, providing a consistent execution environment that abstracts away the differences between various operating systems and hardware architectures.