|
|
|
|
|
by skybrian
3316 days ago
|
|
Flutter has stateful widgets too, and they can be arbitrarily nested with stateless widgets. Stateless widgets are useful for static boilerplate that only changes when moving to a different screen, or when swapping out an entire subview. Supporting arbitrary mutations is extra coding that's unnecessary when it's not going to change anyway. Why implement it when you don't have to? Note that even with entirely stateful widgets, if the whole layout changes, the whole subtree generally to be thrown out which also creates garbage. |
|