Fork me on GitHub
Ramon Rios18:02:19

Hello friends, my view is compiled but not showing anything at all when i create my-view function.

(ns my-app.views
   [re-frame.core :as re-frame]
   [re-com.core :as re-com]
   [my-app.subs :as subs]

(defn title []
  (let [name (re-frame/subscribe [::subs/name])]
     :label (str "Hello from " @name)
     :level :level1]))

(defn my-panel
    :width "300px"
    :placeholder "input your string here"])

(defn main-panel []
   :height "100%"
   :children [[title]
Am i missing something??


Will you at least provide the code for the my-view function?

Ramon Rios18:02:43

Sorry, the view is my-panel. I made a mistake with the name

Ramon Rios18:02:06

And sorry for the pin, it was untencional


Open the JS console. You will see a few errors there with a well specified reason.

Ramon Rios18:02:14

Ok, i forgot that. Thank you


Your panel doesn’t include any information where the value should go. So title knows to show the name sub but it’s not clear that you’ve hooked up the input to put its value there


Why do you think the title's value is linked to the my-panel input?


I assumed this was a little demo. But the point remains that the input text component doesn’t have a value it’s using


It doesn't have :model and it doesn't have :on-change. And, as I mentioned, both of these issues will be specified in the JS console. :) Because re-com checks every argument of its components.

👍 8