Fork me on GitHub

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?


@dottedmag The very first foray into ClojureScript with React Native avoided using the bundler. Some discussion of that history is here