File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 "homepage" : " https://github.com/homebaseio/homebase-react" ,
77 "repository" : {
88 "type" : " git" ,
9- "url" : " https://github.com/homebaseio/homebase-react.git"
9+ "url" : " git+ https://github.com/homebaseio/homebase-react.git"
1010 },
1111 "keywords" : [
1212 " react" ,
1515 " state" ,
1616 " graph"
1717 ],
18+ "main" : " ./dist/homebase.react.js" ,
1819 "devDependencies" : {
1920 "@babel/cli" : " 7.11.6" ,
2021 "@babel/core" : " 7.11.6" ,
2627 "react-dom" : " 16.13.0" ,
2728 "shadow-cljs" : " 2.11.4"
2829 },
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" : " "
3038}
Original file line number Diff line number Diff line change 1818 :output-feature-set :es6 }
1919 :modules {:main {:init-fn example.core/init}}
2020 :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 44 [" marked" :as marked]
55 [cljsjs.react]
66 [cljsjs.react.dom]
7+ [reagent.core]
78 [devcards.core :as dc]
89 [example.counter]
910 [example.todo]))
1415(js/goog.exportSymbol " DevcardsSyntaxHighlighter" highlight)
1516
1617(defn init []
17- (dc/start-devcard-ui! ))
18+ (dc/start-devcard-ui! ))
Original file line number Diff line number Diff line change 11(ns homebase.react
22 (:require
33 [" react" :as react]
4- [reagent.core :as r]
54 [homebase.js :as hbjs]
65 [datascript.core :as d]))
76
1615 (merge (hbjs/js->schema (.-schema config)) base-schema)
1716 base-schema))]
1817 (when (.-initialData config) (hbjs/transact! conn (.-initialData config)))
19- (r/create-element
18+ (react/createElement
2019 (.-Provider homebase-context) #js {:value conn}
2120 (.-children props))))
2221
4342(defn ^:export useTransact []
4443 (let [conn (react/useContext homebase-context)
4544 transact (fn transact [txs] (hbjs/transact! conn txs))]
46- [transact]))
45+ [transact]))
You can’t perform that action at this time.
0 commit comments