Skip to content

Commit

Permalink
Add reagent.dom.client (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
kimo-k committed Nov 24, 2023
1 parent ac1305b commit 2f06b11
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Public API:
- `reagent-debug-namespace`
- `namespaces`

The configuration for `reagent.dom.server` is available seperately via:
Configurations for `reagent.dom.server` and `reagent.dom.client` are available seperately via:

Namespace: `sci.configs.reagent.reagent-dom-server`

Expand All @@ -91,6 +91,13 @@ Public API:
- `config`
- `reagent-dom-server-namespace`

Namespace: `sci.configs.reagent.reagent-dom-client`

Public API:

- `config`
- `reagent-dom-server-namespace`

### [re-frame/re-frame](https://github.com/day8/re-frame)

Namespace: `sci.configs.re-frame.re-frame`
Expand Down
2 changes: 2 additions & 0 deletions playground/src/playground.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

sci.configs.reagent.reagent
sci.configs.reagent.reagent-dom-server
sci.configs.reagent.reagent-dom-client

sci.configs.tonsky.datascript
sci.configs.hoplon.javelin
Expand Down Expand Up @@ -61,6 +62,7 @@
#'sci.configs.re-frame.re-frame-alpha/config
#'sci.configs.reagent.reagent/config
#'sci.configs.reagent.reagent-dom-server/config
#'sci.configs.reagent.reagent-dom-client/config
#'sci.configs.tonsky.datascript/config
#'sci.configs.hoplon.javelin/config
#'sci.configs.hoplon.hoplon/config])
Expand Down
1 change: 1 addition & 0 deletions playground/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ <h1>SCI Playground</h1>
[re-frame.alpha :as rf.a]
[reagent.core :as r]
[reagent.dom.server :as rds]
[reagent.dom.client :as rdc]
[reagent.debug]
[reagent.ratom :as ratom]
[datascript.core :as d]
Expand Down
13 changes: 13 additions & 0 deletions src/sci/configs/reagent/reagent_dom_client.cljs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
(ns sci.configs.reagent.reagent-dom-client
(:require [reagent.dom.client :as srv]
[sci.core :as sci]))

(def rdcns (sci/create-ns 'reagent.dom.client nil))

(def reagent-dom-client-namespace
{'render (sci/copy-var rdc/render rdcns)
'create-root (sci/copy-var rdc/create-root rdcns)})

(def namespaces {'reagent.dom.client reagent-dom-client-namespace})

(def config {:namespaces namespaces})

0 comments on commit 2f06b11

Please sign in to comment.