'Best practices to change app state from a package

I'm developing a standalone package which is currently inside an app like this: app/packages/my_package I created the package with the create command package template.

What I'd like to achieve is to trigger state changes in the app from package during some events, for example while listening to a stream and getting a specific object (in the package) I'd like to trigger some state change in the app,, for example let it know that it can stop loading and "pass" the read object.

I have a feeling that there are several ways to implement this, can you suggest some good approaches and state management tools/techniques to for this scenario?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source