Why is nothing updated here

Hello,

Im now busy with the second challenge of the learn-clojurescript book.
I have to make a temp-converter.

But if I change the output to for example fahrenheit nothing changes.
What do I not understand this time ?

need more context.

Oke

I was expecting that if I change the convert-in drop down list in for example Fahrenheit the text in the green box also changes in F.

but if you see here

the text in the green area is not updated and I cannot see what I did wrong ?

without seeing the source code of how this is implemented, I would guess your drop down has no event (or associated means of control) that should be updating some reactive state somewhere.

It has

(defn update-output [_]
  (if (= :celsius (get-input-target))
    (do (set-output-temp (c->f (get-input-temp)))
        (gdom/setTextContent degree (get-output-temp)))
    (do (set-output-temp (f->c (get-input-temp)))
        (gdom/setTextContent degree (get-output-temp)))))


(gevents/listen output-unit-target "change" update-output)
(gevents/listen temp-input "key-up" update-output)

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.