From f180e39d02137950174f7dcd2d998a6d5c13b532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Piaggio?= Date: Wed, 6 Mar 2024 13:04:29 -0300 Subject: [PATCH] add documentation --- doc/changelog/3.0.0-betas.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/changelog/3.0.0-betas.md b/doc/changelog/3.0.0-betas.md index c10bd6e0d..1bffc7597 100644 --- a/doc/changelog/3.0.0-betas.md +++ b/doc/changelog/3.0.0-betas.md @@ -61,3 +61,16 @@ - Add `useTransition` and `useId` hooks. - Add `startTransition` React API. + +- `ScalaFnComponent` and `ScalaForwardRef` now support `.withDisplayName(name)`. Must be called first (before hooks/`render*`/`withChildren*`). + +Example: + +```scala + ScalaFnComponent.withDisplayName("MyComponent") + .withHooks[Props] + .useState(0) + .render((_, s) => s.value.toString) +``` + +If not specified, a unique name will be inferred from the fully qualified name of the call site.