This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-01-28
Channels
- # aatree (3)
- # alda (8)
- # avi (21)
- # beginners (37)
- # boot (193)
- # cbus (1)
- # cider (29)
- # cljs-dev (8)
- # cljsjs (3)
- # cljsrn (20)
- # clojure (76)
- # clojure-dev (13)
- # clojure-miami (20)
- # clojure-portugal (2)
- # clojure-russia (220)
- # clojure-sg (2)
- # clojurebridge (5)
- # clojurescript (94)
- # community-development (14)
- # conf-proposals (110)
- # core-async (12)
- # cursive (12)
- # datascript (6)
- # datomic (14)
- # dirac (72)
- # emacs (49)
- # hoplon (86)
- # jobs (33)
- # jobs-discuss (1)
- # ldnclj (6)
- # lein-figwheel (1)
- # off-topic (56)
- # om (139)
- # onyx (29)
- # pedestal (17)
- # proton (23)
- # re-frame (45)
- # reagent (35)
- # ring-swagger (4)
- # test-check (1)
- # testing (8)
- # yada (11)
The lein new reagent
template seems to rely on java webservers - is there an example somewhere of deploying reagent with just html, css, and js files?
(ideally also developing with fighweel as the lein new reagent
template is nicely set up with)
Wow @gadfly361 - this looks tremendous, I'll try it out now. Thank you.
@gadfly361: are you using any of the semantic-ui transitions in soda-ash? I’m looking to rotate a cube, but trying to do it an event based way (similar to petrol), and want to avoid using jayq
Does anyone know a way to force Schema validation (`schema.core/with-fn-validation`) for components? I think in Om :instrument
function could be used for this.
@firinne not yet, hoping to have time soon to start tackling things like that. See my comment in this issue which points to some relevant discussion. https://github.com/gadfly361/soda-ash/issues/1
@juhoteperi: But wouldn't (schema/defn component [prop :- PropSchema] ...)
work since Form1 and Form2 components are just functions?
@jaen: Schema does not do any validation by default, only when when enabled with s/with-fn-validation
or if function has :always-validate
metadata, which I don't want to use as I only want to use validation in dev
schema.core/defn
is used to annotate functions, it doesn't enable validation by default
@juhoteperi: can you use schema.core/set-fn-validation!
but in dev only?
Oh I forgot that one. That will probably work.
Lol, reading comprehension fail; I actually thought you were writing set-fn-validation!
instead of with-fn-validation
'
I was somehow thinking that with-fn-validation
would be implemented using dynamic var instead of that strange global state, so I thought there was not global way.
Yeah, pretty surprising - I almost think they should be with-fn-validation!
/ without-fn-validation!
to make it clear they’re mutating something global (otherwise you might use it when connected to a REPL in production)
Related to this, I wonder if there is a way to catch exceptions from Reagent so I could catch those Schema errors and control how they are reported?
Looks like I can use window.onerror
to catch the exceptions
Yeah, we use window.onerror
(via TrackJS, but no reason using it directly wouldn’t work)
Okay got that implemented nice.
Next I would like to get hot reload working after I fix some code which threw exception during rendering. Currently I get Uncaught TypeError: Cannot read property '_currentElement' of null
and I have to reload the whole page
I'm trying to use custom elements (polymer's paper-dialog), but custom attributes get stripped. Apparently React allows custom attributes in custom elements (https://github.com/facebook/react/pull/3752), does reagent not?
the attributes are shown in the react dev tools view, but they don't appear on the actual html elements in the elements view.
@juhoteperi: i hit this problem too
I can get them working by using create-class with :component-did-mount #(doall (for [[k v] attributes] (-> % (.getDOMNode) (.setAttribute (clj->js k) (clj->js v)))))
Is there a way to change the default value for :component-did-mount
for create-class?
Hi, I’ve been using reagent to build a simple SPA and I want to add a custom script tag to the index.html. I can’t find one in the default project so I guess it is autogenerated. Does anyone know where the head > script tags are generated? thanks.
@shriphani: how did you create the project? Did you use a template?
@shriphani: src/clj/[app-name]/handler.clj