When building a single page application, we rely on custom states a lot to create the inner “screen” navigation. With multi-page apps, you can use the “when page is loaded” event to run actions that might be needed to set defaults or initial states of various things.
With SPAs, we have to get a bit more creative to do the same kind of “start of screen” for every screen change since “when page is loaded” only works literally when the page is first loaded. It would be really nice to have a workflow event for “When custom state’s value is changed.” This could help us create the equivalent of “when page is loaded” for SPAs when used in this context. I’m sure there could be other great uses for “When custom state’s value is changed” too.
For example, I’m working on a SPA that has a lot of inner screens, and we want the user to be scrolled to the top every time they change views (which are managed by a custom state). Instead of having to add a “Scroll to page” action for the dozens of different events that change the custom state (ie screen view), it would be great to have a single “When custom state’s value is changed” to run that scroll to top action.
I’m sure there are other use cases, but this is one I’ve run into a few times across multiple apps.