All Projects → Respo → Respo

Respo / Respo

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

Programming Languages

clojurescript
191 projects

Projects that are alternatives of or similar to Respo

respo.cljs
A virtual DOM library built with ClojureScript, inspired by React and Reagent.
Stars: ✭ 232 (+0.87%)
Mutual labels:  virtual-dom, mvc, dom
object-dom
HTML Object Declarative Dom
Stars: ✭ 20 (-91.3%)
Mutual labels:  virtual-dom, dom
lego
🚀 Web-components made lightweight & Future-Proof.
Stars: ✭ 69 (-70%)
Mutual labels:  virtual-dom, dom
Nanomorph
🚅 - Hyper fast diffing algorithm for real DOM nodes
Stars: ✭ 621 (+170%)
Mutual labels:  virtual-dom, dom
CalDOM
An agnostic, reactive & minimalist (3kb) JavaScript UI library with direct access to native DOM.
Stars: ✭ 176 (-23.48%)
Mutual labels:  virtual-dom, dom
Preact
⚛️ Fast 3kB React alternative with the same modern API. Components & Virtual DOM.
Stars: ✭ 30,527 (+13172.61%)
Mutual labels:  virtual-dom, dom
Preact Worker Demo
Demo of preact rendering an entire app in a Web Worker.
Stars: ✭ 204 (-11.3%)
Mutual labels:  virtual-dom, dom
Amplesdk
Ample SDK - JavaScript UI Framework
Stars: ✭ 169 (-26.52%)
Mutual labels:  virtual-dom, dom
Squark
Rust frontend framework, for web browser and more.
Stars: ✭ 162 (-29.57%)
Mutual labels:  virtual-dom, dom
Hyperx
🏷 - tagged template string virtual dom builder
Stars: ✭ 991 (+330.87%)
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.3%)
Mutual labels:  virtual-dom, dom
Asm Dom
A minimal WebAssembly virtual DOM to build C++ SPA (Single page applications)
Stars: ✭ 2,604 (+1032.17%)
Mutual labels:  virtual-dom, dom
Htmlkit
An Objective-C framework for your everyday HTML needs.
Stars: ✭ 206 (-10.43%)
Mutual labels:  dom
Coldbox Platform
A modern, fluent and conventions based HMVC framework for ColdFusion (CFML)
Stars: ✭ 220 (-4.35%)
Mutual labels:  mvc
Panel
Web Components + Virtual DOM: web standards for powerful UIs
Stars: ✭ 206 (-10.43%)
Mutual labels:  virtual-dom
Application
🏆 A full-stack component-based MVC kernel for PHP that helps you write powerful and modern web applications. Write less, have cleaner code and your work will bring you joy.
Stars: ✭ 205 (-10.87%)
Mutual labels:  mvc
Angular Ru Interview Questions
Вопросы на собеседовании по Angular
Stars: ✭ 224 (-2.61%)
Mutual labels:  dom
Hydux
A light-weight type-safe Elm-like alternative for Redux ecosystem, inspired by hyperapp and Elmish
Stars: ✭ 216 (-6.09%)
Mutual labels:  virtual-dom
Circleoffriendsdisplay
朋友圈的做法
Stars: ✭ 205 (-10.87%)
Mutual labels:  mvc
Jest Dom
🦉 Custom jest matchers to test the state of the DOM
Stars: ✭ 2,908 (+1164.35%)
Mutual labels:  dom

Respo: A virtual DOM library in ClojureScript

Inspired by React and Reagent.

Respo

[respo "0.13.10"]

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].