<https://blog.frankel.ch/state-jvm-desktop-framewo...
# feed
n
a
You actually do not need external JRE to execute an application, packed by JPackage. It stores the minified version inside the distribution.
๐Ÿ‘† 1
๐Ÿ‘ 1
d
Thank you, Nicolas! Reposted it in the #compose-desktop
๐Ÿ‘ 1
e
Nice. You can also use property delegation and/or destructuring to avoid having to call
.value
every time. For example:
Copy code
fun main() = Window {                                        
  val state = remember { mutableStateOf("Hello world!") }    
  Row {                                                      
    TextField(
      state.value,                                           
      { state.value = it }                                   
    )
    Text(state.value)
  }
}
could be
Copy code
fun main() = Window {                                        
  val state by remember { mutableStateOf("Hello world!") }    
  Row {                                                      
    TextField(
      state,                                           
      { state = it }                                   
    )
    Text(state)
  }
}
or
Copy code
fun main() = Window {                                        
  val (state, setState) = remember { mutableStateOf("Hello world!") }    
  Row {                                                      
    TextField(
      value = state,                                           
      onValueChange = setState
    )
    Text(state)
  }
}
๐Ÿ‘ 1
n
good idea!
๐Ÿค˜ 1