Fork me on GitHub
#re-frame
<
2016-08-04
>
nilrecurring02:08:40

@shader @danielcompton happens often to me as well that the page will break and I have to refresh, but I don't remember exactly the error message. It's something like "this.innerElement is null"

danielcompton02:08:42

Could be a reagent/react error?

danielcompton02:08:43

There’s only two asserts in re-frames’ code base, and both are for logging with unknown log levels

nilrecurring02:08:20

It looks like it's a reagent/react error to me. How can I start debugging it?

nilrecurring02:08:43

I have no idea from where to start honestly 😄

danielcompton02:08:32

Bit of a gut feel thing at the moment

danielcompton02:08:42

Should be a bit better in the next version of re-frame

nilrecurring02:08:16

Yep I just saw that a PR was merged in the next alpha. I can't bump up the reframe version in the current project because we're near to delivery, but in a couple of weeks I'll start a new one :)

nilrecurring02:08:09

Question: I'm not using cljs-devtools and/or dirac yet, but apparently it's common to use them with reframe?

danielcompton02:08:43

cljs-devtools is a must have

danielcompton02:08:57

dirac is also great, but not as essential as devtools

danielcompton02:08:08

or rather, dirac takes a little bit more work to get setup and using it

danielcompton02:08:12

they’re both great

nilrecurring02:08:15

Yep setting up Dirac looks a bit complicated. Also it needs a nrepl? What about using it with figwheel?

danielcompton02:08:38

works fine with figwheel

danielcompton02:08:50

it’s not as bad as it looks

danielcompton02:08:07

works great with figwheel actually, as you can explore your app state really effectively

nilrecurring02:08:33

Awesome, I'll give it a shot in the next hours :) thanks!

mikethompson03:08:18

Yep, using devtools is ABSOLUETLY essential. And easy these days. Truly, just do it now. Don't wait. 🙂

gadfly36105:08:04

+1 on using cljs-devtools

nilrecurring06:08:49

@mikethompson @gadfly361 yep, I feel on another planet now, logged stuff is actually readable parrot

nilrecurring06:08:34

I wonded why devtools are not included in ANY lein template

oliy06:08:59

@mikethompson I use devtools too but I get a lot of noise about cache hits on subscriptions and event handlers being overwritten when figwheel reloads stuff. Any chance they could be made quieter (debug level)? I'm happy to do a PR if you agree

oliy06:08:28

@rui.yang regarding reloads there is a reagent function to force a refresh on all components, you can arrange for figwheel to call that after it has reloaded. Caveat, it doesn't seem to work on root components, just children. And it doesn't seem to force reframe subscriptions to re-run, but reframe might have hooks for that as well

mikethompson06:08:00

@oliy: The messages about cache hits will disappear shortly. That's just an alpha thing. On the other hand, the warnings from figwheel reloads are a bit unavoidable, assuming we want to be told if event handers have the same id (and we do).

oliy07:08:54

@mikethompson: I don't know if there is a way to emit it only when advanced compilation is on, as in our build but not local dev, or if it could take note of a cljs build variable. But it'll be a lot better when the cache hits don't get logged anymore, thanks

nilrecurring08:08:50

@mikethompson: *any template I looked at. I overlooked the most obvious one! Thanks 🙂

seantempesta13:08:50

In production I’d like to change the re-frame logs to just print text (`str`). I see there’s a set-loggers! function, but it looks like you are just binding the console to it?

shader19:08:00

sorry, when I said re-frame I meant re-com; it seems that a lot of the element parameter validation assertions cause the rendering to break

mikethompson21:08:10

@shader those assertions mean your parameters are wrong.