clojurescripthoploncastra

How to pass an array into Hoplon from a Castra backend


If I am trying to an array into the index.cljs.hl page how do I go about using the array in Clojurescript. I found that I can use:

(loop-tpl :bindings [single-data rpc/test-vector]
    (h2 single-data))

In the hLisp part but if I want to use the array above where the html tag is I seem to run into problems. The array in the rpc.cljs page is as follows

(defc= test-vector    ["Good" "Man" "Shoe"])

And I have tried using map without the data and just an array and it works:

(defn build-list
  []
  (map #(h2 %) ["one" "two" "three"]))

But then if I try and use the array it no longer works and I have no clue why.

(defn build-list
  []
  (map #(h2 %) rpc/test-vector))

Cheers


Solution

  • If you put '@rpc/test-vector' with the last example it works.

    Cheers