Skip to content

docs: update examples for ReScript v13 - #1471

Closed
aspeddro wants to merge 2 commits into
rescript-lang:v13from
aspeddro:migrate-content-v13
Closed

aspeddro wants to merge 2 commits into
rescript-lang:v13from
aspeddro:migrate-content-v13

Conversation

@aspeddro

@aspeddro aspeddro commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

Context

The compiler upgrade exposed outdated MDX examples and stale JavaScript output tabs, causing yarn test to fail. This updates the manual, React documentation, and syntax lookup for ReScript 13.0.0-alpha.6.

Changes

  • Replace %external with optional globalThis bindings, @taggedTemplate with the built-in taggedTemplate type, and %re with regular expression literals.
  • Use TaggedTemplate.make for ReScript tag functions, modern standard-library APIs instead of Belt and removed helpers, and a valid loop-control variable instead of the reserved break identifier.
  • Update React component types and record-props examples, and add the component conversion binding required by the generic JSX transform.
  • Replace the removed @deriving(abstract) example with supported records and accessors, updating the accompanying explanations and links.
  • Regenerate JS/JSX output tabs to match the v13 compiler, including .mjs runtime imports and updated template-literal output.

Validation

  • CI=1 yarn test: 190 pages checked with zero compilation errors, stale outputs, or malformed blocks.
  • Link and redirect checks: zero issues.
  • Changed MDX files formatted with Oxfmt; git diff --cached --check passes.

Dependency

Depends on #1470, which upgrades the compiler and application bindings. This branch currently includes that migration commit in addition to the documentation commit. Rebase onto v13 after #1470 lands if needed to leave only the documentation diff.

Support the alpha compiler with compatible React and WebAPI bindings
across the docs, guide, playground, and shared workspaces. Replace removed
APIs and implicit globals so compilation and browser workflows keep
working with the new type definitions.

Refresh temporary React bindings in the example checker after dependency
upgrades to prevent stale cached packages from masking content errors.
Replace removed syntax and legacy APIs in manual, React, and syntax
lookup examples so they compile with the v13 alpha. Explain the current
tagged template, global binding, record, and React component APIs.

Regenerate JS and JSX output tabs with the installed compiler to keep
the displayed examples consistent and restore content validation.

This branch was successfully deployed

2 active deployments
preview — 8950d4d1 Deployed Nov 1, 2026 by github-actions[bot]
guide-preview — 8950d4d1 Deployed Nov 1, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant