https://github.com/lilactown/7-flex-dom-guis
https://github.com/lilactown/7-flex-dom-guis
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/lilactown/7-flex-dom-guis
- Owner: lilactown
- Created: 2023-03-25T23:49:50.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-01T23:16:25.000Z (over 2 years ago)
- Last Synced: 2025-03-06T08:49:32.415Z (7 months ago)
- Language: Clojure
- Size: 24.4 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 7 flex/dom GUIs
An example project using [flex](https://github.com/lilactown/flex) and
[dom](https://github.com/lilactown/dom) together.Implements tasks 1-5 of the [7 GUIs](https://eugenkiss.github.io/7guis/tasks/).
## Important bits
[town.lilac.flex.dom/scope](./src/town/lilac/flex/dom.cljc) is the macro that
bridges the flex effect system to DOM patching. It expects that the body will
execute a number of `town.lilac.dom` expressions. Any signals or sources
dereferenced in the body will trigger a patch of the last element returned.[town.lilac.guis.main/start!](./src/town/lilac/guis/main.cljs) demos how to
dispose of and recreate the effect graph on hot reload.## Developing
Install JS dependencies (shadow-cljs, incremental-dom) via `npm install` the
first time.Start the `:app` build via shadow-cljs (e.g. `npx shadow-cljs watch app`), open
your browser to http://localhost:3456 and you're off!