From 8d0fb877a332ca555f5369c2c8bd1d974f8911ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Mon, 1 Jun 2026 14:14:33 +0200 Subject: [PATCH] docs: Recommend `JSComponent` over `ReactiveHTML` --- doc/explanation/components/reactive_html_components.md | 2 ++ doc/how_to/custom_components/index.md | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/doc/explanation/components/reactive_html_components.md b/doc/explanation/components/reactive_html_components.md index b1f879ac323..b387a47528b 100644 --- a/doc/explanation/components/reactive_html_components.md +++ b/doc/explanation/components/reactive_html_components.md @@ -6,6 +6,8 @@ This page will walk you through using the `ReactiveHTML` class to craft custom c :::{admonition} warn `ReactiveHTML` was the recommended approach for building custom components before so called ESM components were added. Refer to the [custom component how-to guides](../../how_to/custom_components/index) for more details. + +We recommend using `JSComponent` over `ReactiveHTML` for new custom components. ::: ## Why Use `ReactiveHTML`? diff --git a/doc/how_to/custom_components/index.md b/doc/how_to/custom_components/index.md index 152c7c6a61f..73557c39f1c 100644 --- a/doc/how_to/custom_components/index.md +++ b/doc/how_to/custom_components/index.md @@ -165,6 +165,10 @@ examples/esm_material_ui Build custom components using HTML, CSS and Javascript and without Javascript build tools. +:::{admonition} warn +We recommend using `JSComponent` over `ReactiveHTML` for new custom components. +::: + ::::{grid} 1 2 2 3 :gutter: 1 1 1 2