This PR separates the step of initializing the MCMCDataManager cache from the control for turning its polling off and on, which is now attached to the RunPage page/component directly so that the polling gets terminated in the cleanup step when we're on a page where it isn't relevant.
To do this, I've moved the cache object itself into the base App level and have the reference passed down a couple levels. It's not the greatest, but I didn't really want to set up yet another context object; however, it's possible this would be better managed by a custom hook. I played around with that for a bit but the underlying state wasn't updating properly, so I left it be and stuck with this solution, inelegant though it may be.
Fix #17.
This PR separates the step of initializing the
MCMCDataManager
cache from the control for turning its polling off and on, which is now attached to theRunPage
page/component directly so that the polling gets terminated in the cleanup step when we're on a page where it isn't relevant.To do this, I've moved the cache object itself into the base
App
level and have the reference passed down a couple levels. It's not the greatest, but I didn't really want to set up yet another context object; however, it's possible this would be better managed by a custom hook. I played around with that for a bit but the underlying state wasn't updating properly, so I left it be and stuck with this solution, inelegant though it may be.