Is there an equivalent of global variable ? Modifying a variable outside current scope and context

In this case the cause is actually fairly clear: you use get() followed by update() instead of update with a callback. Here is a post where I explain in detail what the problem and fix for it is: Why is State Final not "final"? - #2 by SillyFreak

a bit “cleaner” is I think using place(hide(...)) which prevents the header from being considered for layout at all.

But the state based solution Mathemensch shows (using update(songs => ...) looks good :) I don’t think it has convergence problems.The update() is inside a context and depends on a get() but I think it’s fine because it’s a different counter.

1 Like