Fork me on GitHub

Does anyone use one of the datalog implementations for app state. I saw datascript has posh and I'm starting to learn datalog


Also is there a benefit to using this if you are using local storage or a non-datomik like database?


This is good stuff 🙂, which one of you made it? haha


I always use it for timed coding challenges so I don't have to wait for the built-in clojure backend to compile

Yehonathan Sharvit09:09:39

@coinedtalk Did you know that you could load code from github gist?

👀 4

nope, that's nifty


I just found out about Netlify, very easy to put something public for free. Tried it with a pokemon re-frame game I made last Chistmas.

👍 4

Hi, is there a way to pprint custom edn ? My record implements IPrintWithWriter but it seems pprint doesnt care...

Braden Shepherdson16:09:27

can anyone recommend an intro to Datomic, and (same or separate) how it can work across the network and on the web?


did anyone manage to solve the Cannot find module 'react' problem?

Jakub Holý (HolyJak)19:09:15

I do not have any such problem? I use shadow-cljs and npm install-ed react.


I heard that it's not a problem with shadow-cljs, but using shadow-cljs is a very big change


I'll stick with cljsjs packaging, then


...between these problems with npm-deps and shadow-cljs's promise of reliable modules, I'm finally trying shadow-cljs. @U05224H0W might win this one after all 😛

👍 4
Jakub Holý (HolyJak)20:09:07

Hello! Any idea how to make my macro output #js? The problem is that the reader tries to process it... My code:

~(let [~name #js ~js-data] ...)

Jakub Holý (HolyJak)20:09:29

sorry, forget it, I just realized I perhaps don't need it since the data will be inserted there later, when it is already compiled to javascript


@holyjak you could just use js-obj instead. its more or less identical. otherwise you can wrap the value in cljs.tagged-literal/JSValue.

👍 4
❤️ 4
Digital Baboon20:09:19

Is there a way to run a command on figwheel js reload? E.g let's say you save a file and then runs "lein cljfmt fix"?


Are you using figwheel-main?


figwheel-main has a hook, lein figwheel allows you to override the build function

Digital Baboon20:09:47

Not sure if "main", but I am using figwheel

Digital Baboon20:09:59

"lein figwheel" is what I run to develop stuff


Hello, somebody could help me how can I use :npm-deps? I read all spec, but not clear for me. I would like to add to project eg. react-google-charts npm repo.

:cljsbuild {:builds
              [{:id "dev"
                :source-paths ["src/cljs"]
                :figwheel {:on-jsload "cljs-react-semantic-ui-example.core/mount-root"}
                :compiler {:main cljs-react-semantic-ui-example.core
                           :output-to "resources/public/js/compiled/app.js"
                           :output-dir "resources/public/js/compiled/out"
                           :asset-path "js/compiled/out"
                           :source-map-timestamp true
                           :preloads []
                           :external-config {:devtools/config {:features-to-install :all}}
                           :install-deps true
                           :npm-deps {:semantic-ui-react "0.73.1"
                                      :react "15.6.2"
                                      :react-dom "15.6.2"
                                      :react-quill "1.3.1"
                                      :react-google-charts "3.0.8"


How can I use this in the cljs ns?


(ns cljs-react-semantic-ui-example.views
   [re-frame.core :as re-frame]
   ["react-quill" :as ReactQuill]
   ;??? ["react-google-charts" :as Chart] ;;; or :refer]
   ["semantic-ui-react/dist/commonjs" :as ui]    
   ["semantic-ui-react/dist/commonjs/modules/Transition/Transition" :as transition]
   ["semantic-ui-react/dist/commonjs/modules/Transition/TransitionGroup"  :as transition-group]
   [reagent.core :as r]))

(def divider (r/adapt-react-class ui/Divider))
(def button (r/adapt-react-class ui/Button))
(def quill-component (r/adapt-react-class ReactQuill))


                                        ;(def chart (r/adapt-react-class Chart))

(defn main-panel []
  (let [name (re-frame/subscribe [:name])
        visible? (r/atom true)]
    (fn []
       [:div "Hello from  " @name]
       [:div [:p "hello"]]
       [button {:on-click #(println "clicked sui button")} "hello"]
        [quill-component {:value "hello" :theme "snow" :style {:width 650 :height 350 :padding-left 100}}]]
        [chart ???]]



So, I added quill and semantic ui.. but I can’t add the gchart in a same way. I just want to understand better how works npm-deps in real production