kitze/mobx-router

Keep a reference of the 'root store' in RouterStore

Closed this issue · 0 comments

thdk commented

As discussed already in #12 and #52 and caused confusion about 'store' being undefined when not passing it explicitly to 'store.router.goTo' in #80, I suggest to keep a reference to the "root store" in RouterStore .

So RouterStore can always provide the value for 'store' and pass it to the lifecycle methods.