跪拜 Guibai
← All articles
Frontend · Backend · Interview

Front-End Learning Shifts from API Recall to Trade-Off Judgment as Agents Write Code

By Moment ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Front-end roles are broadening to include full-stack and AI application work, and agents that generate code are already part of the job. Developers who can specify constraints, reason about trade-offs, and verify output keep their edge; those who only memorize syntax lose it.

Summary

A coding agent can generate React components, state stores, API calls, and even entire features. That raises the question: what's left for a front-end developer to learn? The article argues the old approach of memorizing every API signature, syntax rule, and boilerplate pattern no longer makes sense. What still matters is understanding what each tool is for, what trade-offs it carries, and how to verify the agent's work.

That shift shows up in concrete areas. State management decisions should follow data ownership and lifetime, not a small-vs-large project rule. Async code needs to handle request cancellation, stale responses, and write conditions, not just AbortController calls. React learning moves from Hook signatures to state preservation, unnecessary Effects, and server/client component boundaries. Performance work starts with profiling, not with scattering cache APIs. And when multiple agents stream results, the design problem is defining task/step/message ownership and approval flows.

The article also stresses verification: agent-generated tests can mirror current behavior and pass while missing the real requirement, so assertions must come from the spec, not the implementation. Permissions can't stop at hidden buttons; authorization has to live server-side. Full-stack learning can extend along Node.js without memorizing an entire backend stack. The suggestion is to pick one complex domain, apply these skills there, and let agent-built features like file upload resumption or multi-agent UI deepen your understanding of what needs to be specified and checked.

Takeaways
— State management choices should follow data ownership, consumption scope, and lifetime, not a simple small- vs. large-project rule.
— AbortController cancels requests but doesn't solve stale response ordering; check request cancellation, stale-response filtering, and write conditions.
— Type assertions like `as TaskResult` do not validate runtime data; they only silence the compiler.
— React's `key` prop controls state preservation and reset, so changing it can either fix a symptom or destroy state that should persist.
— An Effect shouldn't be used to sync state that can be derived from existing values; use it for subscriptions, external systems, and timers.
— Resumable file upload must rely on server-confirmed progress, not the client's local progress bar, because a sent request doesn't guarantee a saved chunk.
— SSE's `id` and `retry` fields support reconnection but don't guarantee task recovery; the task needs a stable ID and a status query.
— For multi-agent UI, define ownership of tasks, steps, messages, and tool calls, and show progress with expandable details for logs and errors.
— Human approval must bind to the exact operation and be verified server-side with authorization checks, not just by hiding buttons.
— Agent-generated tests can pass by mirroring current implementation; assertions must be derived from requirements, not from the code's behavior.
— Use an AGENTS.md file to record project conventions, and enforce hard constraints with tool permissions or workspace isolation, not just prompts.
— Performance tuning starts with a Chrome DevTools Performance record, then targets the specific bottleneck (computation, rendering, or layout).
— Full-stack learning can extend along Node.js; the key is understanding how auth, databases, file handling, and async tasks interact, not memorizing a whole backend stack.
Conclusions

The article's premise is that agents can handle implementation but can't supply judgment, which redefines the front-end developer's core skill as specifying constraints and verifying outcomes. That's a concrete shift for anyone hiring front-end talent.

The emphasis on state design and server-side authorization reveals that the real risk with agents isn't code quality but misplaced trust: a generated solution may run and look correct while violating the actual data ownership or security model.

The pushback on the 'small project Zustand, large project Redux' heuristic is a useful correction because agents tend to default to the most obvious pattern rather than the one that fits existing conventions and state relationships.

The insistence on testing against requirements rather than current behavior addresses a known failure mode: agent-generated tests can pass while the feature still fails the spec, so the developer must supply the assertion intent.

Concepts & terms
AGENTS.md
A file that records project conventions, module responsibilities, coding rules, test commands, and special notes, so coding agents have the context they need to generate code without being told everything each time.
SSE id and retry fields
Server-Sent Events include an `id` field for marking event position and a `retry` field for reconnection timing, but they only enable reconnecting; the application still needs to query task state and fill gaps to achieve true recovery.
Discriminated unions
A TypeScript pattern where a common property (e.g., `type`) lets the compiler narrow down which shape an object has, enabling exhaustive checks and preventing invalid states from being treated as valid.
From the discussion
Featured comments
PBitW

True, agreed. Going forward, experience plus knowing what to use where and what it solves will matter more.

PBitW

But you also need a spirit of experimentation, to see what new things can solve and whether they're better than the old ones. Otherwise, if you keep relying on experience the whole way, there's no way to improve.

Moment  → PBitW

Right, trying new approaches is important.

See top comments, translated →
Source: juejin.cn ↗ Google Translate ↗ Backup ↗