Tag

Directives

0 views collected around this technical thread.

Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Apr 29, 2025 · Frontend Development

Implementing Vue‑Style Directives in React with a Babel Plugin

This article explores three approaches to bring Vue‑like directives such as r‑if and r‑for into React, compares their pros and cons, and provides a complete Babel plugin implementation that transforms custom JSX attributes into standard React conditional and list rendering syntax.

BabelDirectivesJSX
0 likes · 9 min read
Implementing Vue‑Style Directives in React with a Babel Plugin
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Dec 11, 2024 · Frontend Development

Lesser‑Known Vue.js Built‑in Directives: v‑once, v‑pre, and v‑memo

This article introduces three lesser‑used Vue.js built‑in directives—v‑once, v‑pre, and v‑memo—explaining their purposes, underlying mechanisms, and providing practical code examples that demonstrate how they can improve rendering performance or bypass compilation when applied appropriately.

DirectivesVuefrontend
0 likes · 7 min read
Lesser‑Known Vue.js Built‑in Directives: v‑once, v‑pre, and v‑memo
360 Tech Engineering
360 Tech Engineering
Nov 8, 2019 · Fundamentals

Function Implementation Hiding Proposal: Goals, Directives, and Alternative Approaches

This article reviews the TC39 function‑implementation‑hiding proposal, explains the new hide‑source and sensitive directives that can conceal Function.prototype.toString and Error.stack details, evaluates their benefits and drawbacks, compares alternative hiding mechanisms, and answers common questions about the specification.

DirectivesError.stackFunction.prototype.toString
0 likes · 13 min read
Function Implementation Hiding Proposal: Goals, Directives, and Alternative Approaches