You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that (history/start! constants/routes) fires [:active-page-changed] even before app is bootstrap, therefore before :district0x/smart-contracts-loaded. This causes error, because :active-page-changed assumes :district0x/smart-contracts-loaded.
Currently I used little hack to avoid error:
For (.-onhashchange js/window) we already have district0x.ui.window-fx file, you can put new reg-fx there.
For (history/start! constants/routes) you can create district0x.ui.history-fx. Don't put into district0x.ui.history because this file is required many times, so reg-fx is not overwritten every time.
The text was updated successfully, but these errors were encountered:
Those side effects should be done in
reg-fx
and called as regular re-frame events.name-bazaar/src/name_bazaar/ui/core.cljs
Lines 40 to 43 in bb040c7
But why?
The problem is that
(history/start! constants/routes)
fires[:active-page-changed]
even before app is bootstrap, therefore before:district0x/smart-contracts-loaded
. This causes error, because:active-page-changed
assumes:district0x/smart-contracts-loaded
.Currently I used little hack to avoid error:
name-bazaar/src/name_bazaar/ui/events.cljs
Lines 145 to 146 in bb040c7
So make it an re-frame event that's fired here at bootstrap
name-bazaar/src/name_bazaar/ui/core.cljs
Line 50 in bb040c7
For
(.-onhashchange js/window)
we already havedistrict0x.ui.window-fx
file, you can put newreg-fx
there.For
(history/start! constants/routes)
you can createdistrict0x.ui.history-fx
. Don't put intodistrict0x.ui.history
because this file is required many times, soreg-fx
is not overwritten every time.The text was updated successfully, but these errors were encountered: