Skip to content

Instantly share code, notes, and snippets.

@IwoHerka
Created September 15, 2019 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IwoHerka/aad5d1e34dfb615eda90f94196246444 to your computer and use it in GitHub Desktop.
Save IwoHerka/aad5d1e34dfb615eda90f94196246444 to your computer and use it in GitHub Desktop.
Lightning Hiccup Tutorial Example 16
(defn counter-btn [title]
(let [counter (reagent/atom 0)]
(html
[:button
{:on-click (fn [e] (swap! counter inc))}
title])))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment