Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added React.js like render mechanism #219

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ autodoc/**
/.classpath
/.project
/.settings
.idea/
*.iml
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
[![Build Status](https://secure.travis-ci.org/daveray/seesaw.png?branch=master)](http://travis-ci.org/daveray/seesaw)
## Seesaw with virtual dom
It's a fork of [seesaw](https://github.com/daveray/seesaw). This fork has virtual dom feature like **React.js**.

There's now a [Google Group](https://groups.google.com/group/seesaw-clj) for discussion and questions.
```clojure
(ns seesaw.ex
(:require [seesaw.core :as s]
[seesaw.options :refer [satom]]))

(def app-state (satom {:title "my-title"
:size [200 :by 325]}))

(def ff (s/frame :title (seesaw.options/get-k app-state :title)
:size (seesaw.options/get-k app-state :size)
:visible? true))

(swap! app-state update :title (constantly "helloo"))
;=>> re-renders the UI

(swap! app-state update :size (constantly [500 :by 300]))
;=>> re-renders the UI
```

[Here's a brief tutorial](https://gist.github.com/1441520) that covers some Seesaw basics. It assumes no knowledge of Swing or Java.

Expand Down
30 changes: 16 additions & 14 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,37 @@

:url "http://seesaw-clj.org"

:mailing-list {:name "seesaw-clj"
:mailing-list {:name "seesaw-clj"
:archive "https://groups.google.com/group/seesaw-clj"
:post "[email protected]"}
:post "[email protected]"}

:license {:name "Eclipse Public License - v 1.0"
:url "http://www.eclipse.org/legal/epl-v10.html"
:license {:name "Eclipse Public License - v 1.0"
:url "http://www.eclipse.org/legal/epl-v10.html"
:distribution :repo
:comments "same as Clojure"}
:comments "same as Clojure"}

:warn-on-reflection true

; To run the examples:
;
; $ lein examples
;
:aliases { "examples" ["run" "-m" "seesaw.test.examples.launcher"] }
:aliases {"examples" ["run" "-m" "seesaw.test.examples.launcher"]}

:dependencies [[org.clojure/clojure "1.4.0"]
:dependencies [[org.clojure/clojure "1.10.1"]
[com.miglayout/miglayout "3.7.4"]
[com.jgoodies/forms "1.2.1"]
[org.swinglabs.swingx/swingx-core "1.6.3"]
[com.jgoodies/forms "1.3.0"]
[org.swinglabs.swingx/swingx-core "1.6.5-1"]
[j18n "1.0.2"]
[com.fifesoft/rsyntaxtextarea "2.5.6"]]
:profiles { :dev {:dependencies [[com.stuartsierra/lazytest "1.1.2"]
[com.fifesoft/rsyntaxtextarea "3.0.3"]]
:plugins [[lein-ancient "0.6.15"]
[lein-cljfmt "0.6.4"]]
:profiles {:dev {:dependencies [[com.stuartsierra/lazytest "1.1.2"]
[lein-autodoc "0.9.0"]]}}
:repositories [["stuartsierra-releases" "https://stuartsierra.com/maven2"]]
:autodoc {
:name "Seesaw",
:page-title "Seesaw API Documentation"
:copyright "Copyright 2012, Dave Ray" }
:name "Seesaw",
:page-title "Seesaw API Documentation"
:copyright "Copyright 2012, Dave Ray"}
:java-source-paths ["jvm"])

Loading