AriaFallah / mobx-store

A data store with declarative querying, observable state, and easy undo/redo.
MIT License
282 stars 9 forks source link

Dispose of observers when store is no longer used. #24

Closed AriaFallah closed 8 years ago

AriaFallah commented 8 years ago

Figure out how to get rid of these observers when the store is garbage collected as per https://github.com/mobxjs/mobx/issues/224#issuecomment-215760543

https://github.com/AriaFallah/mobx-store/blob/master/src/index.js#L85

mweststrate commented 8 years ago

I don't think you need that in your case as there is no unstore mechanism if looked correctly? Otherwise, observe returns a function, which, when invoked, disposes the observer.