Preact 10
Last reviewed Sep 20, 2026
Prompt Details
Prompt Composition
2prompts
- JavaScript ES2026102 lines · 3.1K tokens
- Preact 1051 lines · 2.6K tokens
Total153 lines · 5.8K tokens
CWE Coverage
- 20
- 79
- 89
- 95
- 117
- 208
- 209
- 323
- 338
- 346
- 347
- 352
- 362
- 459
- 471
- 488
- 494
- 502
- 524
- 532
- 602
- 674
- 770
- 772
- 807
- 829
- 838
- 841
- 862
- 915
- 916
- 918
- 922
- 943
- 1004
- 1287
- 1321
- 1333
Prompt Preview
Apply the JavaScript ES2026 prompt first. These rules cover Preact 10, its bundled hooks, compat and JSX APIs, and optional SSR integration, and were checked against 10.29.8 and preact-render-to-string 6.7.0. Browser compatibility depends on the application build and host APIs; Preact 10's legacy-browser compatibility does not supply ES2026 features or browser security controls.
Package and renderer boundaries
- Resolve
preact,preact/hooks,preact/compat, andpreact/jsx-runtimeto the reviewed core package in client builds, SSR builds, aliases, and import maps. Usepreact/compatfor React compatibility; the old standalonepreact-compatpackage belongs to Preact 8. Check bundled copies so an older dependency cannot reintroduce the JSON VNode injection regression fixed before 10.29.8. - Review and lock the SSR renderer separately, including when accessed through
preact/compat/server:preact-render-to-stringhas its own releases, and Preact's optional peer range>=5is a compatibility declaration, not a security floor. Refresh it withnpm update preact-render-to-stringand check every copy withnpm ls preact-render-to-string. Never let request data choose prop or attribute names, because the renderer writes them into markup. Check the deployed server runtime and streaming APIs separately; core Preact declares no Node.jsenginesrequirement.
VNodes, props, and DOM sinks
- Validate external display fields as the expected string or number before placing them in JSX children; ordinary text children use text nodes in the browser and escaping in