JavaScript: Guides and Practical Know-how | Page 20 | mironsoft Blog
JavaScript
-
Jan 23, 2025
setTimeout(0) and requestIdleCallback give the browser no real information about how important a task actually is. scheduler.postTask() closes that gap with explicit priority levels: user-blocking, user-visible, and background, so your own code joins the same queue that also manages rendering and input, instead of competing against it.
-
Jan 22, 2025
A field name with a leading underscore like _value was never more than a convention in JavaScript: readable, overwritable, and visible in any debugger from outside at any time. Private class fields and methods with the # syntax implement true, interpreter-enforced encapsulation, with clear limits around inheritance and their own safe way of doing brand checks via the in operator.
-
Jan 16, 2025
Headless commerce with Magento GraphQL promises flexibility. In practice, Apollo Client configuration, type-safe code generation, SSR/SSG caching and fragment design decide whether the frontend stays fast and maintainable or turns into a complexity trap.
-
Jan 15, 2025
Choosing the right TypeScript runtime directly shapes developer productivity and daily build speed. This article compares the three most common options for Node.js projects across startup time, type checking, and watch mode support, and explains when full type checking during execution actually matters and when a fast feedback loop is the better choice for one off scripts, local development, and CI pipelines.
-
Jan 15, 2025
Some web applications need a screen that stays on: a cooking recipe you do not want to tap while stirring, a video call without camera movement, or a progress bar that runs for minutes. The Screen Wake Lock API solves exactly this problem without tricks like invisible videos or dummy timers.
-
Jan 14, 2025
A misconfigured module field in tsconfig.json or an incomplete exports map in package.json regularly causes ERR_REQUIRE_ESM or ERR_UNKNOWN_FILE_EXTENSION errors in TypeScript packages that only surface at the consumer's end. Understanding the differences between ESM and CommonJS at compile time avoids the dual-package hazard and delivers packages that work reliably in both worlds.
-
Jan 13, 2025
WebGPU is the web's modern answer to direct GPU programming and is gradually replacing WebGL as the standard for heavy graphics and computation work in the browser. Once you understand the core concepts, you gain access to compute shaders, more efficient memory management, and a much more modern API.
-
Jan 13, 2025
If you change ten refs one after another, Vue does not render ten times, it renders once. The reactivity scheduler batches DOM updates through the microtask queue, and nextTick() is the tool for reliably waiting for exactly that moment instead of relying on accidental timing.
-
Jan 12, 2025
The official TypeScript compiler tsc is written in JavaScript and optimized for type safety, not speed. esbuild and swc compile the same TypeScript code in Go and Rust respectively, achieving ten to twenty times shorter build times, while deliberately skipping full type checking during transformation.
-
Jan 9, 2025
Four new array methods return a changed copy instead of mutating the original. That finally makes sort(), reverse() and splice() unnecessary in state driven code.