E0572 State that starts over after a swap
Words in italics are filled in when the compiler reports it, such as the element's name or the list of known ones.
Why
When duolith dev swaps in a page or layout, each state(...) it declares keeps the value it had, as long as its name and type stayed the same. The type is what the script says of it: the type argument with the types the file declares that it uses, or the kind of the initial value. When the type of a state the screen keeps changed, keeping the old value could break the new code, so the screen is built again with all its state from the start. Shared state (state(x, { shared })) and state.load always live on.
How to fix it
Nothing: the screen shows its new code with its initial values. To keep a value across such a change, keep its type the same and change it in a later edit.
In a terminal
duolith explain E0572