lambdaisland

sakalli 2017-07-01T15:58:50.800266Z

@plexus using the reagent tutorial from lambdaisland to get going building a slideshow app. a little bit stuck here trying to pass the state atom to the render function. the chestnut reagent template is changed since you did the tutorial i suspect. it now includes stuartsierras components and needs a render function defined. any pointers how to get it to work?

plexus 2017-07-01T16:03:37.831382Z

@sakalli are you able to push your code to Github? I need a bit more context to see what to do...

sakalli 2017-07-01T16:05:07.840137Z

not much code yet following the kanban tutorial but hacking to my needs, can paste a snippet here.

plexus 2017-07-01T16:06:55.850381Z

sure

plexus 2017-07-01T16:07:16.852394Z

which flags did you pass to chestnut? are you using +reagent?

plexus 2017-07-01T16:07:52.855759Z

I should probably update the transcript on those episodes to use a locked version of Chestnut

plexus 2017-07-01T16:13:06.884237Z

it's basically the same though, except that render is now wrapped in a method

plexus 2017-07-01T16:13:09.884419Z

(ns sesame.core
  (:require [reagent.core :as r]))

(def app-state
  (r/atom ,,,))

,,,

(defn Board [state]
  [:div.board
   (for [c (:columns @state)]
     [Column c])
   [NewColumn]])

(defn render []
  (r/render [Board app-state] (js/document.getElementById "app")))

sakalli 2017-07-01T16:15:06.894966Z

ok cheer! got it to work now. just a typo. thanks for your help!

sakalli 2017-07-01T16:15:14.895833Z

sorry for the inconvenience.

plexus 2017-07-01T16:15:24.896769Z

you're welcome! good luck with your app 😄

sakalli 2017-07-01T16:15:26.896999Z

used the --reagent flag