Fork me on GitHub
#reagent
<
2017-09-21
>
dfcarpenter23:09:00

Newish user. Using django and cljs/reagent. Been working in dev fine but trying to output a production build. I see the page load find in django along with the js file but nothing happens. The div#id is correct and the same as was used in dev. Any ideas?

gadfly36123:09:51

@dfcarpenter is there anything printing out in the browser console when you load the page?

dfcarpenter23:09:01

nothing at all

dfcarpenter23:09:55

I was under the impression for advanced builds that I didn't need to run the init() function in another script tag. Maybe I am wrong?

gadfly36123:09:37

Yeah, you should always have to run a function to kick things off. Some people (like myself) make a named function, like init and use a script in our index.html file to run it. Others call the init function directly from within their core namespace, which would then mean you dont need to call it from index.html so long as you include the compiled cljs file

noisesmith23:09:41

one advantage to putting the call in your index.html is that it's simpler to have test coverage that way