TLDR Dev · OPINIONS & ADVICE

DIRECTIVES AND THE PLATFORM BOUNDARY

tanstack.com10 min read

Summary from the TLDR Dev newsletter

There is an increasing trend of JavaScript frameworks introducing custom directives, such as `use client` and `use server`, which resemble language features but lack standardization. These directives can cause confusion, complicate debugging, and reduce portability by blurring the line between the JavaScript platform and specific frameworks. Explicit APIs with imports give better provenance, versioning, and tooling ergonomics compared to directives that end up working as platform “lock-in.”