Closed chandu0101 closed 6 years ago
lazy initialization FTW! ;) , make root
def and it works :)
TODO: find a way to to pass custom transformer --transformer scalajsTransformer
Great! Thanks for the investigative work!
to pass custom transformer , add following to app.json
"packagerOpts": {
"transformer": "scalajsTransformer"
}
Source: https://forums.expo.io/t/how-to-pass-custom-transformer-to-react-native-scripts/1159
It should be
"packagerOpts": {
"transformer": "scalajsTransformer.js"
}
... but
$ exp --start --android --dev
complains like this:
[exp] Cannot find module 'metro-bundler/build/transformer'
@frgomes try loading original transformer from src
folder instead of build
.
SOLVED
Instructions here: https://github.com/frgomes/mobile.g8/tree/expo-support
@frgomes 👍 👏
Looks to me like this issue can be closed. Please yell if I missed something.
Ideas :
1) Export root component to toplevel using
JSExportTopLevel
and then use it in App.jsScala.JS Code :
App.js
Result:
sjs.scalajs_root_component
returning null! (Investigate more...)