dust blog
Read State During Build

One State Management rule is worth keeping strict.
Use watchXViewModel().value only where UI should rebuild. Use readXViewModel() in callbacks, lifecycle methods, and dependency factories.
Dust generates those ViewModel accessors from @ViewModel. Reading state during build and calling commands without subscribing stay separate.
Read the Dust State Management guide.
#Dust #State #Flutter #Dart #CodeGeneration
