babel / babel/website

Clarify that Fragment DOM and reconciliation behavior is runtime-defined

Open Beginner friendly
#3,241 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
777
Forks
1.4k
Avg merge
16h 45m
Merged PRs (30d)
3

Description

The Fragments section clearly shows the emitted code for the automatic and classic runtimes. It does not explicitly separate the compiler transform from runtime behavior, so readers may infer that Babel decides whether a Fragment creates DOM nodes or how Fragment identity is retained.

I suggest adding a short note after the Fragment examples that clarifies:

- Babel rewrites fragment syntax to the configured Fragment reference or factory;
- the transform itself does not create a DOM wrapper;
- DOM shape, keyed identity, and component-state retention are defined by the selected JSX runtime and renderer, not by Babel;
- the existing emitted-code examples remain unchanged.

An optional non-normative companion illustrating the React runtime consequences is [Fragment DOM and reconciliation behavior](https://frontendatlas.com/react/trivia/react-fragments-dom-and-reconciliation).

Disclosure: I maintain FrontendAtlas. This would be documentation-only and would not imply a compiler behavior change. Would this scope be welcome as a small PR?

Contributor guide

No contributing guide indexed for this repository

Research direction

Open the Fragments section and review the automatic and classic runtime examples first. Add a short note separating Babel's syntax transform from the configured runtime and renderer, while leaving the emitted-code examples unchanged. Done means the documentation clearly assigns DOM shape, keyed identity, and component-state retention to the selected runtime and renderer.

Written by the indexing model from the issue text.

Assessment

Tech stack
babel, javascript
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.