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
Hey, I think there is a subtle bug in the profile dev init files.
The :jsload-callback (effectively) calls core/init!; however, it should instead call core/mount-root. This is an important distinction, because the core/init! function should run things once when the application first loads, and core/mount-root should be called every time figwheel reloads.
@karad Upon further inspection, this line here will also be problematic and I think it should likely be removed.
That line will effectively call the core/init! function on every figwheel reload because it is a direct function call in a namespace. A way around this is to instead call the core/init! function from your index.html file. You could do that by adding a line here with the core/init! function call.
An example of how to make such a function call from an index.html file can be seen here, which references this function here
Hey, I think there is a subtle bug in the profile dev init files.
The
:jsload-callback
(effectively) callscore/init!
; however, it should instead callcore/mount-root
. This is an important distinction, because thecore/init!
function should run things once when the application first loads, andcore/mount-root
should be called every time figwheel reloads.Bug is here:
https://github.com/karad/lein_template_descjop/blob/master/resources/leiningen/new/descjop/reagent__src__front__profile__dev__init.cljs#L10
:jsload-callback should instead call
mount-root
:https://github.com/karad/lein_template_descjop/blob/master/resources/leiningen/new/descjop/reagent__src__front__core.cljs#L10
The text was updated successfully, but these errors were encountered: