Fork me on GitHub

Hi there! I'm trying to use re-frame in a different type of project, and I want to subscribe to a change in the app-db, but outside a render/reagent component. Is it possible?


it is possible, but it can be easy to create a memory leak if you don't eventually clean up the subscription


You also write "to a change" - note that using a subscription outside of a reactive context will not magically re-run the surrounding code. A reactive context is a view or a reaction or a similar thing that ends up being used in a view.