All Projects → Respo → respo.cljs

Respo / respo.cljs

Licence: MIT license
A virtual DOM library built with ClojureScript, inspired by React and Reagent.

Programming Languages

Cirru
14 projects
clojure
4091 projects

Projects that are alternatives of or similar to respo.cljs

Respo
A virtual DOM library built with ClojureScript, inspired by React and Reagent.
Stars: ✭ 230 (-0.86%)
Mutual labels:  virtual-dom, mvc, dom
object-dom
HTML Object Declarative Dom
Stars: ✭ 20 (-91.38%)
Mutual labels:  virtual-dom, dom
Nanomorph
🚅 - Hyper fast diffing algorithm for real DOM nodes
Stars: ✭ 621 (+167.67%)
Mutual labels:  virtual-dom, dom
Hyperx
🏷 - tagged template string virtual dom builder
Stars: ✭ 991 (+327.16%)
Mutual labels:  virtual-dom, dom
lego
🚀 Web-components made lightweight & Future-Proof.
Stars: ✭ 69 (-70.26%)
Mutual labels:  virtual-dom, dom
CalDOM
An agnostic, reactive & minimalist (3kb) JavaScript UI library with direct access to native DOM.
Stars: ✭ 176 (-24.14%)
Mutual labels:  virtual-dom, dom
Preact
⚛️ Fast 3kB React alternative with the same modern API. Components & Virtual DOM.
Stars: ✭ 30,527 (+13058.19%)
Mutual labels:  virtual-dom, dom
Squark
Rust frontend framework, for web browser and more.
Stars: ✭ 162 (-30.17%)
Mutual labels:  virtual-dom, dom
Val
VirtualDOM abstraction layer - give yourself better integration and full control over the DOM with any virtual DOM library that uses a Hyperscript-like API such as React and Preact.
Stars: ✭ 181 (-21.98%)
Mutual labels:  virtual-dom, dom
Amplesdk
Ample SDK - JavaScript UI Framework
Stars: ✭ 169 (-27.16%)
Mutual labels:  virtual-dom, dom
Preact Worker Demo
Demo of preact rendering an entire app in a Web Worker.
Stars: ✭ 204 (-12.07%)
Mutual labels:  virtual-dom, dom
Asm Dom
A minimal WebAssembly virtual DOM to build C++ SPA (Single page applications)
Stars: ✭ 2,604 (+1022.41%)
Mutual labels:  virtual-dom, dom
libgitlmvc
C++ MVC framework for Qt
Stars: ✭ 73 (-68.53%)
Mutual labels:  mvc
softn-cms
Sistema de gestión de contenidos
Stars: ✭ 22 (-90.52%)
Mutual labels:  mvc
ozark-react
A ViewEngine for ReactJS templates for the Java EE MVC 1.0 reference implementation Ozark.
Stars: ✭ 43 (-81.47%)
Mutual labels:  mvc
ExpressWebpack
Webpack and Express backend boilerplate
Stars: ✭ 15 (-93.53%)
Mutual labels:  mvc
potato-webmvc
📝一个简单的Web MVC框架,寂寞消遣之作~
Stars: ✭ 26 (-88.79%)
Mutual labels:  mvc
kontent-boilerplate-net
Kontent.ai Boilerplate for development of ASP.NET Core MVC applications.
Stars: ✭ 29 (-87.5%)
Mutual labels:  mvc
ready
Detect element availability on the initial page load and those dynamically appended to the DOM
Stars: ✭ 77 (-66.81%)
Mutual labels:  dom
velox
The minimal PHP micro-framework.
Stars: ✭ 55 (-76.29%)
Mutual labels:  mvc

Notice: since the author has moved to Calcit-js, the maintenance has been moved to respo.calcit. And this repo will no longer be developed.

Respo: A virtual DOM library in ClojureScript

Inspired by React and Reagent.

Respo

[respo "0.13.11"]

Usage

DOM syntax

(div {:class-name "demo-container"
      :style {:color :red}
      :on-click (fn [event dispatch!])}
      (div {}))

Text Node:

(<> content)
; with styles
(<> content {:color :red
             :font-size 14})

Component definition:

(defcomp comp-container [content]
  (div
    {:class-name "demo-container"
     :style {:color :red}}
    (<> content)))

App initialization:

; initialize store and update store
(defonce *store (atom {:point 0 :states {}}))
(defn dispatch! [op op-data] (reset! *store updated-store))

; render to the DOM
(render! mount-point (comp-container @*store) dispatch!)

Rerender on store changes:

(defn render-app! [] (render! mount-point (comp-container @*store) dispatch!))

(add-watch *store :changes (fn [] (render-app!)))

Reset virtual DOM caching during hot code swapping, and rerender:

(defn reload! []
  (clear-cache!)
  (render-app!))

Adding effects to component:

(defeffect effect-a [text] [action parent-element at-place?]
  (println action) ; action could be :mount :update :amount
  (when (= :mount action)
    (do)))

(defcomp comp-a [text]
  [(effect-a text) (div {})])

Define a hooks plugin, like components it has caching support:

(defplugin plugin-x [a b]
  {:ui (div {} (<> "Demo"))
   :show (fn []
            (do))})

Read docs to use Respo:

Test

yarn compile-test
node target/test.js

Develop

Calcit Workflow https://github.com/mvc-works/calcit-workflow

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].