-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Require RN packages #1
Comments
Better ide from the referenced re-natal discussion: Can we wrap |
Addition to that - we cannot do things like (let [packages ["react-native"])
(zipmap packages (map js/require packages))) As it looks like React packager use RegExp or not smart enough to catch it. Macroses FTW then! |
A bit of comments for the future references. Although Another tricky thing that those replacing are quite hacky and for example you cannot make a require call from the nested scopes (see Conditional How we can improve it: Let's leave it as it - if any problem arise, it will a good sign to finally make a transition to boot |
According to http://blog.fikesfarm.com/posts/2015-07-24-using-react-native-components-in-clojurescript.html RN packager resolve all
require('package-name')
by using their own custom logic. As we are using Figwheel and basically avoid packager we cannot just require a package which is a pain.Idea: We specify all needed packages in
src/repl.cljs
like:As our REPL app runs using RN packager we can require all of those packages and store it inside global
ktoa.repl.packages
Later on in the main application code we may call
ktoa.core.require('package-name')
which in the development mode will fetch deps from thektoa.repl.packages
and during the release will emit simplerequire
calls, which in turn will be processed during bundle creation.The text was updated successfully, but these errors were encountered: