This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-04-07
Channels
- # beginners (166)
- # cider (6)
- # cljs-dev (12)
- # cljsrn (64)
- # clojure (71)
- # clojure-chicago (1)
- # clojure-spec (14)
- # clojure-uk (2)
- # clojurescript (25)
- # datomic (2)
- # docs (1)
- # duct (1)
- # emacs (4)
- # fulcro (5)
- # graphql (3)
- # java (46)
- # mount (5)
- # off-topic (29)
- # onyx (1)
- # portkey (10)
- # re-frame (12)
- # remote-jobs (1)
- # shadow-cljs (46)
- # spacemacs (1)
- # specter (4)
- # vim (2)
@steveb8n you can’t have more than one react since they will fight over control of the dom. typically, libraries specify a minimum version of react, not a specific version
if you plan on using a number of react libraries, I personally will direct you to one of two techniques: (1) bundle all your js with webpack or (2) use shadow-cljs
I would urge against npm-deps, which tries to do closure optimization and is an experimental feature with lots of limitations and unhelpful error reporting
this is my view on the whole thing with some background to help you choose: https://gist.github.com/jmlsf/f41b46c43a31224f46a41b361356f04d
can anybody answer this question https://groups.google.com/forum/#!topic/clojurescript/E7H1cuZQpys ? how to extract metadata of foreign-lib dependencies in self-hosted cljs
I'm using transit
, but I'm running into problems when I want to use it together with [cljs-time.core :as time]
> (t/write (t/writer :json) (time/hours 1))
#object[Error Error: Cannot write ]
cognitect$transit$write (jar:file:/home/storage/mvn/repository/com/cognitect/transit-cljs/0.8.256/transit-cljs-0.8.256.jar!/cognitect/transit.cljs:278:11)
nil
>
> (time/hours 1)
{:years nil,
:months nil,
:weeks nil,
:days nil,
:hours 1,
:minutes nil,
:seconds nil,
:millis nil}
what am I missing? Why does transit has problems with serializing cljs-time.core/Period
?
I’ve no idea about transit, should write return a string? How do you specify where to write?
write should return a json string, right.
it seems it has to do something with types.
numbers etc don't seem to be a problem
but (time/hours 1)
returns a cljs-time.core/Period
-type.
See “writing custom values” here: https://github.com/cognitect/transit-cljs/wiki/Getting-Started
Right... makes sense. thx.