(ns example (:require [reagent.core :as r])) (def click-count (r/atom 0)) (defn counting-component [] [:div "The atom " [:code "click-count"] " has value: " @click-count ". " [:input {:type "button" :value "Click me!" :on-click #(swap! click-count inc)}]])
import QtQuick.Controls 2.3 Button { property int count: 0 onClicked: count++ text: count == 0 ? "Click me!" : "The value is : " + count }