Skip to content

rmschindler/solid-cljs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

solid-cljs

ClojureScript bindings to SolidJS

Early alpha, unstable and highly experimental

Installation

  1. yarn add solid-js --save-dev
  2. Use Clojure's Git deps

Example

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"))

Playground

source in src/app/core.cljs

  1. Install NPM deps yarn
  2. Run local build clojure -M -m shadow.cljs.devtools.cli watch app
  3. Go to localhost:3000

About

ClojureScript bindings to SolidJS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Clojure 95.6%
  • HTML 4.4%