mobx-state-tree icon indicating copy to clipboard operation
mobx-state-tree copied to clipboard

Add support for keepAlive

Open weiwei-lin opened this issue 2 years ago • 3 comments

Feature request Support equivalent of @computed({keepAlive: true}). Note that keepAlive from mobx-utils isn't the same. Since it causes the computed value to always be re-evaluated even there's no other observers.

Is your feature request related to a problem? Please describe.

The lack of computed support make the friction of migrating from MobX to MST a lot higher. And given that MST use a tree-like structure for managing states, arguably the chance of memory leak is even lower.

Are you willing to (attempt) a PR?

  • [x] Yes
  • [ ] No

weiwei-lin avatar Aug 23 '22 14:08 weiwei-lin

@weiwei-lin - kind of like I mentioned in #1950 - are you still having trouble with this/interested in opening a PR? I don't know if I understand all the implications of this feature request, but I'd be happy to talk with you about it if it's still on your mind all this time later.

coolsoftwaretyler avatar Jun 25 '23 04:06 coolsoftwaretyler