Closed user471 closed 7 years ago
I also tried https://github.com/chandu0101/sri-mobile-template and has the same error
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<div id="root"></div>
<script type="text/javascript" src="https://unpkg.com/react@15.4.1/dist/react.js"></script>
<script type="text/javascript" src="https://unpkg.com/react-native-web@0.0.64/dist/ReactNative.js"></script>
<script type="text/javascript" src="./assets/scalajs-output.js"></script>
<script type="text/javascript">
sri.mobile.template.MobileApp().main();
</script>
</body>
</html>
package sri.mobile.template
import sri.mobile.ReactNative
import sri.mobile.all._
import sri.mobile.template.router.AppRouter
import scala.scalajs.js.JSApp
import scala.scalajs.js.Dynamic.{literal => json}
import org.scalajs.dom
object MobileApp extends JSApp {
def main() = {
val root = createReactNativeRoot(
AppRouter.router
)
ReactNative.AppRegistry.registerComponent("SriMobileTemplate", () => root)
ReactNative.AppRegistry.runApplication("SriMobileTemplate", json(rootTag = dom.document.getElementById("root")))
}
}
if you're using only for web development nothing changed in 0.7.
as i said earlier sri will not work with global.React
anymore , you must use npm .
if you're using only for web development nothing changed in 0.7.
I want to create mobile app and use same code to run it in browser with https://github.com/necolas/react-native-web It was possible with 0.6
as i said earlier sri will not work with global.React anymore , you must use npm .
Is there any description how sri works with React in 0.7?
I want to create mobile app and use same code to run it in browser with https://github.com/necolas/react-native-web
then don't worry about updating to 0.7 now
Is there any description how sri works with React in 0.7?
sorry no particular doc other than working https://github.com/chandu0101/sri#templates . wish i had more time ;)
I used version 0.6
and with
I could open my app in browser and it worked. But with 0.7.1 I am not sure not to do it. There is an js error