JavaScript

Frontend Basics — P3

Will AI replace IT? Not anytime soon. Keep an eye on AI, but don’t forget the fundamentals — they’re the foundation, and AI is just a tool. Here’s a JS array question to illustrate some basics.

Apr 2, 2025

React Hook Form Usage Guide

Forms are a common interaction method in user interfaces, and validating/managing their state can be challenging. In the React ecosystem, React Hook Form package name: react-hook-form is a powerful solution for complex form management. To use it flexibly and appropriately, this guide summarizes common scenarios, usage patterns, easily overlooked points, and core principles. Please provide feedback if there are any omissions.

Mar 31, 2025

ESLint Usage Guide

Common Plugins "eslint-config-tencent" "plugin:react/recommended", "plugin:@typescript-eslint/recommended", "plugin:react-hooks/recommended" Related Links https://www.npmjs.com/package/eslint-config-tencent

Feb 19, 2025

Bundle Size Issues Caused by Misusing Lodash

Highlights how default lodash imports pull in the full bundle, shows safer import patterns, and compares the savings from switching to lodash-es.

Dec 11, 2024

Implementing Passwordless Login for Sites in iframes

Recently, in a private project, I encountered a requirement where sites embedded in iframes needed to implement passwordless login. Here are some initial thoughts on possible solutions. IP Whitelist for Passwordless Login? Any request to the server can obtain the client IP from the request object, making IP-based authentication possible. However, the drawback is that users cannot log in once they change their network environment.

Nov 24, 2024

Monaco-Editor Implementation of Syntax Highlighting

You need to configure the language to implement syntax highlighting in Monaco Editor. Here, we introduce the related operations. Set Language If setting the language during initialization, the operation is as follows:

Nov 7, 2024

Quickly Fix Bugs in Open Source Community Repositories

In projects, we often use many third-party NPM packages, such as Mousetrap. We usually encounter bugs that have not yet been fixed or merged by the official repository. So, what should we do in such cases? Here is a summary of the methods.

Oct 24, 2024

Browser Fingerprinting

What browser fingerprints are, FingerprintJS v3 vs. v4 licensing, expected accuracy, and basic usage.

Oct 22, 2024

Understanding ua-parser-js

In real-world development we often parse the UA header to detect device details—whether the user is on Windows or macOS, or if they’re on mobile. If you just use userAgent, you have to parse the string by hand, which is painful. A much easier option is to bring in ua-parser-js, a mature library that surfaces the UA information for you.

Oct 18, 2024

Frontend Visual Graph Editing

A recent project needed a visual flow editor. Here’s a survey of available libraries and tools. IBM’s Open-Source Node-RED Apache License Graph Layout Library dagre-d3 MIT License Graph Layout Library cola.js MIT License

Oct 17, 2024