File tree Expand file tree Collapse file tree 4 files changed +21
-7
lines changed Expand file tree Collapse file tree 4 files changed +21
-7
lines changed Original file line number Diff line number Diff line change 6
6
"homepage" : " https://github.com/homebaseio/homebase-react" ,
7
7
"repository" : {
8
8
"type" : " git" ,
9
- "url" : " https://github.com/homebaseio/homebase-react.git"
9
+ "url" : " git+ https://github.com/homebaseio/homebase-react.git"
10
10
},
11
11
"keywords" : [
12
12
" react" ,
15
15
" state" ,
16
16
" graph"
17
17
],
18
+ "main" : " ./dist/homebase.react.js" ,
18
19
"devDependencies" : {
19
20
"@babel/cli" : " 7.11.6" ,
20
21
"@babel/core" : " 7.11.6" ,
26
27
"react-dom" : " 16.13.0" ,
27
28
"shadow-cljs" : " 2.11.4"
28
29
},
29
- "dependencies" : {}
30
+ "dependencies" : {},
31
+ "bugs" : {
32
+ "url" : " https://github.com/homebaseio/homebase-react/issues"
33
+ },
34
+ "scripts" : {
35
+ "test" : " echo \" Error: no test specified\" && exit 1"
36
+ },
37
+ "author" : " "
30
38
}
Original file line number Diff line number Diff line change 18
18
:output-feature-set :es6 }
19
19
:modules {:main {:init-fn example.core/init}}
20
20
:js-options {:resolve {" devcards-marked" {:target :npm :require " marked" }
21
- " devcards-syntax-highlighter" {:target :npm :require " highlight.js" }}}}}}
21
+ " devcards-syntax-highlighter" {:target :npm :require " highlight.js" }}}}
22
+ :npm-dist {:target :npm-module
23
+ :output-dir " dist"
24
+ :output-to " dist/lib.js"
25
+ :entries [homebase.react]
26
+ :compiler-options {:optimizations :advanced
27
+ :source-map false }}}}
Original file line number Diff line number Diff line change 4
4
[" marked" :as marked]
5
5
[cljsjs.react]
6
6
[cljsjs.react.dom]
7
+ [reagent.core]
7
8
[devcards.core :as dc]
8
9
[example.counter]
9
10
[example.todo]))
14
15
(js/goog.exportSymbol " DevcardsSyntaxHighlighter" highlight)
15
16
16
17
(defn init []
17
- (dc/start-devcard-ui! ))
18
+ (dc/start-devcard-ui! ))
Original file line number Diff line number Diff line change 1
1
(ns homebase.react
2
2
(:require
3
3
[" react" :as react]
4
- [reagent.core :as r]
5
4
[homebase.js :as hbjs]
6
5
[datascript.core :as d]))
7
6
16
15
(merge (hbjs/js->schema (.-schema config)) base-schema)
17
16
base-schema))]
18
17
(when (.-initialData config) (hbjs/transact! conn (.-initialData config)))
19
- (r/create-element
18
+ (react/createElement
20
19
(.-Provider homebase-context) #js {:value conn}
21
20
(.-children props))))
22
21
43
42
(defn ^:export useTransact []
44
43
(let [conn (react/useContext homebase-context)
45
44
transact (fn transact [txs] (hbjs/transact! conn txs))]
46
- [transact]))
45
+ [transact]))
You can’t perform that action at this time.
0 commit comments