Fork me on GitHub
#figwheel-main
<
2018-11-01
>
bmills00:11:57

How would I point figwheel-main to my custom server that uses mount and compojure to set up the handlers? I’ve got a server I built on a luminus template and want to use that to serve out my SPA page instead of the built-in.

bmills00:11:50

does my server need to implement an endpoint for ?

bmills00:11:47

oh, I think I misunderstood. I thought I had to point :connect-url to my web server, but that’s the url for the server run by figwheel

bmills00:11:59

so that was simple. Thanks!

👍 4
andrea.crotti15:11:41

I'm banging my head against the wall on a project where auto reload worked fine yesterday

andrea.crotti15:11:02

and stopped working today, and I can't really see any change that should have made it stop working

andrea.crotti15:11:36

so whenever I change something the change is detected and the new JS is produced, I also see the figwheel logo, but simply the page doesn't re-render

andrea.crotti15:11:50

can't see any errors anywhere, any idea what to look at?

bhauman15:11:30

OK first you need to know if the code is loading

bhauman15:11:49

you can do that by placing a console.log in at the top level of the file

bhauman15:11:58

I’m pretty sure the code is loading

bhauman15:11:49

and make sure that the changed code is loading

bhauman15:11:56

on every reload

bhauman15:11:24

now you need to look at what framework you are working with

bhauman15:11:34

and how you are triggering it to re-render

andrea.crotti15:11:03

mm damm I just noticed there is no figwheel-hooks or after-load anywhere

andrea.crotti15:11:15

I guess that's why, but I don't know how it was workoing until now then

bhauman15:11:44

well a reload can have side effects

bhauman15:11:59

and in certain cases it may cause a rerender

andrea.crotti15:11:59

but in general without the figwheel-hooks and after-load it won't work right?

bhauman15:11:23

it depends if you are calling the render to dom at the top level

bhauman15:11:34

if you are doing that in the main file

bhauman15:11:51

actually there are lots of variables

bhauman15:11:02

but its possible that it will work with out it

andrea.crotti15:11:10

yeah ok I see, it's kind of a standard re-frame app

andrea.crotti15:11:31

here is an initialize-page that calls the render

bhauman15:11:53

it sounds like you just need to make sure that you re-render the whole thing on reload using hooks

andrea.crotti15:11:08

yeah ok I just wonder how the heck it was working until yesterday, but maybe just by luck

andrea.crotti15:11:17

I'll have a look, thanks a lot!

👍 4
andrea.crotti16:11:54

yes problem solved, I'm quite puzzled that it was working before (even though not everywhere and not only with Emacs for some pages)

andrea.crotti16:11:01

but now it's working everywhere, thanks @bhauman

bhauman16:11:31

glad to hear that 🙂

bhauman16:11:43

your welcome!

andrea.crotti19:11:54

maybe there should be a little re-frame section somewhere @bhauman

andrea.crotti19:11:16

I think everyone using the "standard" way to write a re-frame app will require these meta-data to get the render to work

andrea.crotti19:11:27

(or anyone using reagent maybe for that matter)

andrea.crotti19:11:34

unless I misunderstood entirely, but how else do you actually can get a standard re-frame app to work locally without https://github.com/bhauman/figwheel-main#reload-hooks ?

bhauman19:11:38

Happy to accept a PR 🙂

andrea.crotti21:11:11

where though? in the main readme?

andrea.crotti21:11:48

or maybe a new document related with more framework specific documentation?