Liking cljdoc? Tell your friends :D

Reacher React (in prototype)

WIP...

React toolkits in ClojureScript based on React component in pure cljs using ES6 class inheritance

Demo http://repo.respo-mvc.org/reacher/

Usage

Clojars Project

[respo/reacher "0.1.1"]

Example:

(defn comp-space [props]
  (let [w (j/get props :w), h (j/get props :h)]
    (if (some? w)
      (div {:style (adorn {:display :inline-block, :width w})})
      (div {:style {:height h}}))))

(defn comp-creator []
  (let [[draft set-draft!] (React/useState ""), dispatch! (use-dispatch)]
    (React/useEffect (fn [] (.. js/document (querySelector ".box") (focus))) (array))
    (div
     {:style (adorn ui/row-middle)}
     (input
      {:className "box",
       :style (adorn ui/input),
       :placeholder "task content",
       :value draft,
       :onChange (fn [event] (set-draft! (.. event -target -value)))})
     (=< 8 nil)
     (button
      {:style (adorn ui/button),
       :onClick (fn []
         (when (not (string/blank? draft)) (dispatch! :create draft) (set-draft! "")))}
      "Add"))))

Public APIs:

reacher.core/adorn

reacher.core/div
reacher.core/span ; and more
reacher.core/tag*

Workflow

Based on calcit-workflow.

License

MIT

Can you improve this documentation? These fine people already did:
jiyinyiyong & ChenYong
Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close