figwheel-main

figwheel-main http://figwheel.org
2019-07-15T11:03:43.068400Z

@oskarkv I don't see :external-config in the CLJS compiler options https://clojurescript.org/reference/compiler-options

2019-07-15T11:05:17.068700Z

Look at the :preloads section here -- https://figwheel.org/docs/compile_config.html

2019-07-15T11:05:31.069200Z

it shows how to use devtools

oskarkv 2019-07-15T11:10:03.070200Z

@dimovich the preloads section does not say how to configure devtools, just that it preloads.

PB 2019-07-15T13:35:53.072300Z

Hey all, I'm seeing soemthing weird. I'm using figwheel main with re-frame. When I make a change to one of the source files, I see the code get reloaded for that file (via the browser console), however functions do not appear to be re-loaded.. I.e. If I have a component that renders a header, and I make a change to the header, that component does not change. I am confident that the file is re-loaded as I have put a (js/console.log "hi") inside of the file (which gets printed as the file reloads) but if I put one inside of the function, it does not get printed as the file re-loads

PB 2019-07-15T13:36:45.072600Z

I'm rather baffled by this

2019-07-15T18:52:42.072900Z

It's hard to tell without some code examples. Are you talking about a re-frame event / subscription ? Or about a reagent component? Does the component make reference to some reagent/atom ?

2019-07-15T18:55:42.073100Z

Does the function that mounts your reagent components has the ^:after-load figwheel hook?

2019-07-15T18:57:21.073300Z

Have you tried using the programmatic configuration? https://github.com/binaryage/cljs-devtools/blob/master/docs/configuration.md#programmatic-configuration

2019-07-15T18:58:36.073600Z

I see that figwheel-main is aware of the :external-config

PB 2019-07-15T19:10:19.074300Z

It would just be a regular component such as:

(defn title
  []
  [:h1 "mooo"])

PB 2019-07-15T19:10:49.074500Z

I do not have an ^:after-load hook

2019-07-15T19:33:32.074700Z

this is how I usually use figwheel-main

2019-07-15T19:34:15.076Z

2019-07-15T19:36:41.076200Z

more information -- https://figwheel.org/docs/hot_reloading.html

PB 2019-07-15T19:56:28.076500Z

This helps a lot, thank you

👍 1
oskarkv 2019-07-15T22:29:09.076800Z

You might need this too https://github.com/Day8/re-frame/blob/master/docs/FAQs/Why-Clear-Sub-Cache.md

oskarkv 2019-07-15T22:30:39.077100Z

I tried with the programmatic config, but figwheel-main loads devtools by default, but only with the formatters, and that happens after my own preload. 😛