This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-09-03
Channels
- # aleph (3)
- # announcements (1)
- # beginners (116)
- # boot (8)
- # braveandtrue (4)
- # cider (40)
- # cljdoc (120)
- # cljsrn (10)
- # clojure (29)
- # clojure-austin (4)
- # clojure-dev (43)
- # clojure-germany (1)
- # clojure-italy (4)
- # clojure-nl (17)
- # clojure-russia (19)
- # clojure-uk (76)
- # clojurescript (118)
- # cursive (13)
- # datascript (11)
- # datomic (73)
- # emacs (24)
- # figwheel-main (176)
- # fulcro (40)
- # hyperfiddle (4)
- # leiningen (3)
- # off-topic (1)
- # pedestal (4)
- # re-frame (6)
- # reagent (22)
- # reitit (1)
- # ring (3)
- # rum (8)
- # shadow-cljs (41)
- # spacemacs (11)
- # specter (19)
- # unrepl (1)
Is there an explanation of what RN packager exactly does? I haven't found any in RN docs.
@dottedmag The packager is now called the Metro bundler. It does two things: 1. Bundles all the js code into a single file and adds some magic around it to make it run properly. 2. Runs a server in dev mode that serves the js file to the native layer (simulator or real device)
So, is it really needed for ClojureScript environment, where we have Figwheel for development and cljs compiler compiling bundles for releases?
"Needed" in the sense "cannot be avoided in principle", not in "has to be used right now".
@dottedmag In theory yes, some clear obstacles atm: 1. cljs not working as seamlessly with npm modules as metro 2. The “magic” that wraps the compiled JS Number 1 could be solved with something like shadow-cljs or additional progress in the npm-deps property, as long as they seamlessly can consume the RN npm packages Number 2 is probably a lot easier to solve as soon as you understand what it actually does
@vikeri By magic you mean some kind of boilerplate code added by bundler, or transformation?
Could be this fn for example: https://github.com/facebook/metro/blob/28bea3e3cfe656b0636c4d021847cbf4eb328dd6/packages/metro/src/lib/getPreludeCode.js#L13
@dottedmag The very first foray into ClojureScript with React Native avoided using the bundler. Some discussion of that history is here https://clojurians-log.clojureverse.org/cljsrn/2018-05-07