Skip to content

Commit

Permalink
add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rpiaggio committed Jul 11, 2024
1 parent 814e16e commit f180e39
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions doc/changelog/3.0.0-betas.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit f180e39

Please sign in to comment.