Fork me on GitHub
#clojurescript
<
2019-12-17
>
manutter5112:12:02

I was mistaken--whenever I would make a change, like adding a println, figwheel would update my code and force a re-render, which would display the default values correctly, making it look like my change had fixed the code. If I did a page reload, it would regenerate the app-db and then re-generate the page, re-manifesting the bug.

manutter5112:12:56

The problem was that my multi-select options were coming from the server, meaning that the first time the multi-select rendered, there would be no default values. Then, when the default values arrived from the server, the component would not re-render, because React had cached it. Fix was to put a key on the parent component, and have the key change whenever the default values changed, which triggers a full re-render.

vikeri15:12:14

For people who use Firefox and would like the excellent cljs-devtools to work there as well, please go in and vote for this: https://bugzilla.mozilla.org/show_bug.cgi?id=1262914 as per https://github.com/binaryage/cljs-devtools/issues/40

aisamu16:12:48

Some 3+ votes coming 🙂, thanks for the reminder!

roman01la15:12:20

The last time I’ve talked to Firefox DevTools team about custom formatters they had concerns about security and performance, don’t know what’s the state atm

guillermo16:12:06

sorry for the very specific question, is it possible to connect from calva to a remote cljs repl ? i've successfully connected to a remote clj repl using ssh port forwarding if i do the same with cljs i can connect the remote repl to my browser but id like to also connect with calva to the remote repl

pavel.klavik18:12:54

Hi, I am using sente and when sending a large message from the client (a vector containing a few thousands of elements), sente fails and the message is not send. I get the following in the console:

backend.js:6 WARN [taoensso.sente:1065] - Chsk is closed: will try reconnect attempt (1) in 1162 ms

pavel.klavik18:12:16

Should I send a few smaller messages? Or should I use transit to compress the message?

pez18:12:15

@guillermo I'm not in the know with these remote scenarios, but please ask that question in #calva-dev and hopefully we can get an answer. If it is not possible to connect, I'm super curious in what needs to be done in Calva to enable it. (I'm a Calva dev)

pavel.klavik19:12:37

Testing transit now and it solves the problem with too large size. But I am getting stuck on transit UUIDs vs Clojurescript UUIDs (https://github.com/cognitect/transit-cljs/pull/10). How should I convert them to ClojureScript UUIDs with Sente directly?

pavel.klavik20:12:40

Solved by

(sente-transit/get-transit-packer :json {} {:handlers {"u" uuid}})