mirror of
https://github.com/phfroidmont/scalive.git
synced 2025-12-25 13:36:59 +01:00
Use Dyn as key for LiveState
This commit is contained in:
parent
57f43a0780
commit
8f19ccfbb4
6 changed files with 19 additions and 19 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue