How to pass an array into Hoplon from a Castra backend

44 views Asked by At

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

1

There are 1 answers

0
phlie On BEST ANSWER

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

Cheers