Nodashka is now on NPM

npm install nodashka
npm install ink
npx nodashka ink-demo.cljs

(ns ink-demo
(:require [reagent.core :as r]
["ink" :refer [render Text]]))

(defonce state (r/atom 0))
(doseq [n (range 1 11)]
(js/setTimeout #(swap! state inc) (* n 500)))

(defn hello []
[:> Text {:color "green"} "Hello, world! " @state])

(render (r/as-element [hello]))

· · Web · 0 · 0 · 0
Sign in to participate in the conversation

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!