Fork me on GitHub
#reagent
<
2018-04-22
>
reefersleep12:04:34

I’m missing a :hindsight: emoji 😄

alex-dixon14:04:29

I’m trying to interop with react-spring. I have a couple components rendering, but the setup I’ve been able to come up with so far seems pretty clumsy. I’m also not able to render 100 animated elements without crashing the browser… : https://github.com/alex-dixon/shadow-cljs-react-spring

alex-dixon15:04:30

Looks like react-spring might be the problem?

alex-dixon17:04:08

@fj.abanses Wow. Thanks. Will try that as soon as I can

👍 4
lilactown19:04:17

man, integrating with apollo-client was a lot easier than I thought it would be

lilactown19:04:03

trying to integrate with apollo-react was kind of 😬 but the underlying apollo-client + reagent atoms has got me to:

(defn poke-name-weight [number]
  (let [pokemon (watch-query!
                 client
                 "query NameWeight($number: Int!) { pokemon(number: $number) { name weight } }"
                 {:variables {:number number}})]
    (fn [number]
      (let [{:keys [name weight]} (get-in @pokemon [:data :pokemon])]
        [:<>
         [:div "Pokemon " number "'s name is " name]
         [:div "And weight is " weight]]))))

cider 4
alex-dixon20:04:38

@lilactown Nice. What’s :<> ?

lilactown20:04:57

a React fragment

mikethompson23:04:55

@alex-dixon new in version 0.8

🎉 8