Use Dyn as key for LiveState

This commit is contained in:
Paul-Henri Froidmont 2025-08-18 04:52:07 +02:00
parent 57f43a0780
commit 8f19ccfbb4
Signed by: phfroidmont
GPG key ID: BE948AFD7E7873BE
6 changed files with 19 additions and 19 deletions

View file

@ -6,9 +6,9 @@ final case class Elem(name: String, age: Int)
class TestView extends LiveView[TestView.Cmd]:
import TestView.Cmd.*
private val textCls = LiveState.Key[String]
private val someBool = LiveState.Key[Boolean]
private val elems = LiveState.Key[List[Elem]]
private val textCls = Dyn[String]
private val someBool = Dyn[Boolean]
private val elems = Dyn[List[Elem]]
def mount(state: LiveState): LiveState =
state