This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-01-21
Channels
- # announcements (24)
- # aws (2)
- # babashka (20)
- # beginners (147)
- # cider (20)
- # clara (43)
- # clj-kondo (3)
- # cljdoc (15)
- # cljsjs (1)
- # cljsrn (36)
- # clojars (19)
- # clojure (64)
- # clojure-europe (4)
- # clojure-italy (45)
- # clojure-nl (1)
- # clojure-spec (20)
- # clojure-uk (26)
- # clojurescript (16)
- # cursive (9)
- # datomic (18)
- # dirac (14)
- # docker (3)
- # fulcro (48)
- # keechma (1)
- # leiningen (32)
- # luminus (1)
- # off-topic (40)
- # pedestal (1)
- # quil (1)
- # re-frame (24)
- # reagent (3)
- # reitit (3)
- # remote-jobs (2)
- # ring-swagger (4)
- # shadow-cljs (115)
- # spacemacs (22)
- # specter (4)
- # tools-deps (76)
ok, no need to document my steps because @tkjone’s video series had me up and running super fast! definitely worth sharing with people like me who come in wanting help starting from scratch https://www.youtube.com/channel/UCfBUN43AQoyGiQxmCIDZe2w
is there a channel for clojure.spec?
oh wow, it didn't show up on the search... thanks
my only remaining resistance to CLJS for front-end development is overhead of converting data structures from CLJS to JS back and forth. in real world apps w lots of data, do people experience problems w this? to what extent does it hurt initial launch/startup time? (i'm specifically looking to create a react-native app, using sqlite for offline storage)
this depends a lot on your app and what systems it’s interacting with. if you’re using a lot of external JS libs/components that requires you to deeply convert a lot of CLJS structures to JS in order to interop, then you might have a less than good experience
this is where things like cljs-bean
like darwin suggested can help, but it’s not as nice as using JS
however, if most of your app is CLJS then you shouldn’t see a lot of overhead converting data structures. you should almost always pass around immutable data and serialize them using EDN/transit
if you’re going to use SQLite you’re going to be serializing tabular data to something more structured anyway, so the diff between serializing to/from JSON and to/from EDN shouldn’t be that big I would expect
helix’s method of creating macros for native components can help a lot here. E.g. if for React Native you had a macro:
(Text {:foo-bar "baz"})
that rewrote {:foo-bar "baz"}
to #js {:fooBar "baz"}
that gets rid of 90% of the times when you need to convert to and from at runtime IME