one of the components unmounts, the subscription is evicted from subscription cache
the component that is still mounted would have a nil subscription
The error was calling dispose! on unmount. The solution is to use reference counting, storing the counter on the subscription itself (this will be either a reagent.ratom.Reaction or reagent.ratom.Cursor). When the reference counter is zero it is safe to dispose of.
There was a bug:
The error was calling
dispose!
on unmount. The solution is to use reference counting, storing the counter on the subscription itself (this will be either areagent.ratom.Reaction
orreagent.ratom.Cursor
). When the reference counter is zero it is safe to dispose of.