Fork me on GitHub
#clojurescript
<
2020-12-06
>
Carlo00:12:09

which developer plugin do you use to inspect the state of the app when using reagent?

djblue04:12:16

If you are using shadow-cljs, I think you can use its inspect + tap>

djblue04:12:55

If not, you can always use https://github.com/djblue/portal to inspect your reagent state (shameless plug 😂)

6
borkdude10:12:20

I recommend portal! There is also this thing: https://github.com/Odinodin/data-frisk-reagent

Carlo00:12:19

the react one?

Carlo00:12:35

also, when I insert a keyword in some javascript state, it's silently converted to a js object. So code like (= :my-keyword state) where state is originally a keyword (but now a string) will fail

victorb11:12:29

that doesn't sound right, I think. You have a fuller example of this?

Carlo00:12:49

what's the usual way of going around that?

rgm15:12:03

I noticed the “Newbie Friendly Tickets” link in the Clojurescript github wiki (https://github.com/clojure/clojurescript/wiki/Developers) is a dead link to the old Clojure Jira. Is there a revised link for the new Jira? (Well, “dead” = 403 forbidden).

Alex Miller (Clojure team)15:12:42

presuming that was a filter, I don't know that it was recreated in the new jira system

Alex Miller (Clojure team)15:12:46

probably could do though

Alex Miller (Clojure team)15:12:43

if you get to the point of wanting to supply patches, please see https://clojure.org/dev/dev for process to sign the CA and request a jira account, and discuss any issues in #cljs-dev

🙏 3
Alex Miller (Clojure team)15:12:09

and I updated the wiki page link

Dan Maltbie22:12:40

I'm getting the following error message when I try to call a function from emacs/cider debug Buffer (window). #object[Error Error: No protocol method IDeref.-deref defined for type null: ] The code works when I call it from the webpage. the cider debugger says that it is a function. ttncore.copy> (st/fetch-block "xx" :LINK) #object[Error Error: No protocol method IDeref.-deref defined for type null: ] ttncore.copy> (type st/fetch-block) #object[Function]

dpsutton22:12:01

somewhere you're dereferencing nil instead of an atom it seems

Dan Maltbie22:12:13

Yes, it seems like it should be something obvious like that. Hard to isolate failure though since it doesn't indicate where in the code or what atom is being dereferenced. thanks for the suggestion.

dpsutton22:12:21

what's the full stacktrace? place it here in this thread using triple backticks: `

dpsutton22:12:52

triple backticks
allow multiple
lines

Dan Maltbie05:12:29

That's one of the weird things, there isn't a stacktrace.

Dan Maltbie05:12:08

ttncore.store> (def b (fetch-block sfile "27hsXhXLBCT9zpPv"))

#object[TypeError TypeError: coll.cljs$core$IEmptyableCollection$_empty$arity$1 is not a function]
ttncore.store> 
This is the output from cider repl. Just two lines.

Dan Maltbie05:12:28

I found the problem code two levels below the call shown above.

dpsutton05:12:23

If it’s a browser based repl you can check the console and in the repl you can evaluate *e to see if it has the stack trace

Dan Maltbie19:12:33

Good to know. I've been able to fix my problem with your help. I did look at the stack trace in the browser but didn't help. Thanks again for your help. My programming error.

dpsutton22:12:15

@nill or (deref nil)