Fork me on GitHub
#cljsrn
<
2020-06-19
>
benny00:06:56

is it possible to make my expo app the launcher on android without ejecting?

ferossgp11:06:28

Have someone succeed using https://docs.swmansion.com/react-native-reanimated/docs/installation#babel-plugin ? Basically to run babel post-precessing for code which is live loaded and evaled on device. I tried to monkey-patch clojurescript compiler, to run babel on generated code before returning it but thats an uglly method which I would like to avoid.

Shako Farhad01:06:36

I didn't know re-animated 2 was out yet. I am also interested in how to get this working with shadow-cljs. @U050KSS8M had a cljc macro that he used to create worklet function with javascript directive "worklet". I don't know if he has actually tried to use re-animated 2 this way though.

raspasov02:06:21

Important, put this in a *.cljc file:

(defmacro js-directive
  [directive]
  (list 'js* (str "'" directive "'")))

raspasov02:06:41

I haven’t tried reanimated 2

ferossgp08:06:38

The actual problem is not in adding directives, but in the fact that they use a babel plugin which transform functions with directives into special closures that then are executed in a separated JS env. More on that here: https://github.com/software-mansion/react-native-reanimated/blob/master/plugin.js

Shako Farhad08:06:27

I think re-animated 2 is quite rough for now. They said that they wanted to make the installation part of it simpler in the future. Maybe just wait until it has matured a little bit. But it would be so nice if this could be solved. Looks so good with re-animated 2! 😄

ferossgp11:06:50

Babel could be also injected in shadow-cljs build when emit/emitln is called or krell rn-eval but this is not an universal method