Thanks you both for your answers! My current implementation is very similar to what @moonwave99 provided (thank you for the detailed example) so it seems to me that I'm following the correct approach on managing the state for this example :)