Fork me on GitHub
#reagent
<
2017-04-24
>
mvrc12:04:21

Hi everyone ! Is there a way to perform a let in a for loop ? I have a table with elements which have different prices in different currencies. I don't know how to update currencies correctly. Example :

(for [{:keys [id
                    available_supply
                    price_usd
                    price_btc
                    price_eur]} (filter-content myfilter)] ^{:key id}
          :let [price (get-price price_usd price_btc price_eur)]
       [:tr
         [:td id]
         [:td available_supply]
         [:td (* available_supply price)]]])

mvrc12:04:46

mmmhh... I feel really stupid... I didn't put the let at the right place 😅

noisesmith19:04:23

this is a pet peeve of mine, but for is not a loop (it’s a list comprehension)

noisesmith19:04:39

I blame rhickey for naming it for

domkm21:04:22

Has anyone successfully used Reagent with React 16 alpha?

souenzzo22:04:38

Anyone Else gettin tons os "violations" in chrome?