ClojureScript bindings to SolidJS
Early alpha, unstable and highly experimental
yarn add solid-js --save-dev
- Use Clojure's Git deps
solid-cljs wraps SolidJS API documented at solidjs.com/docs/latest/api
(ns app.core
(:require [solid.core :as s :refer [$ defui]]))
(defui app []
(let [n (s/signal 0)]
(s/effect
(println "n:" @n))
($ :div
($ :button {:on-click #(swap! n inc)} "+")
@n
($ :button {:on-click #(swap! n dec)} "-"))))
(s/render ($ app) (js/document.getElementById "root"))
source in src/app/core.cljs
- Install NPM deps
yarn
- Run local build
clojure -M -m shadow.cljs.devtools.cli watch app
- Go to localhost:3000