Provide destroy method
See original GitHub issueFeature request
I can subscribe on some events inside module, but I can’t unsubscribe with current API
For example, crosstab module subscribes on storage
event and this logic will work whole page lifecycle, and I don’t have mechanism to stop it.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Spring core. Default @Bean destroy method - Stack Overflow
One of the methods it provides is the destroy method being called by Spring. This way you don't have to provide any implementation...
Read more >Spring - init() and destroy() Methods with Example
destroy -method is bean attribute using which we can assign a custom bean method that will be called just before the bean is...
Read more >Spring init-method and destroy-method example - Mkyong.com
In Spring, you can use init-method and destroy-method as attribute in bean configuration file for bean to perform certain actions upon ...
Read more >How to use init-method and destroy-method attributes in ...
Program to demonstrate how to use init-method and destroy-method attributes in Spring Configuration file.
Read more >Destroying Components - Kendo UI for jQuery
The destroy method: Deletes the component instance (client object). As a result, the component is no longer accessible and all its event handlers...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi, I think this is responsibility of module author to allows “destroy” module. We can imagine multiple different scenarios where the store have to support destroy but only partially, so covering them all from the storeon top level will be hard and will requires changes of api. In my project I’m using such pattern for modals:
Example on @jeetiss code:
or

Do you need to use Storeon plugins or you write your own? If you have only own modules, this way will work for you.
If you need a “destroy” support in standard plugins, we need something like
@destroy
event (but still it will be awesome to move it to some submodule, since it is rare feature).