Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ lazy val `react-native` = project
},
stFlavour := Flavour.SlinkyNative,
stStdlib := List("es5"),
stIgnore := List("url"),
stIgnore := List("url", "@expo/config-plugins"),
run := {
(Compile / fastOptJS).value
Process("expo start", baseDirectory.value).!
Expand Down
39 changes: 20 additions & 19 deletions react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,36 +10,37 @@
"dependencies": {
"@ant-design/icons-react-native": "2.2.1",
"@ant-design/react-native": "4.0.5",
"@react-native-community/async-storage": "1.12.0",
"@react-native-community/async-storage": "~1.12.0",
"@react-native-community/cameraroll": "4.0.0",
"@react-native-community/picker": "1.6.6",
"@react-native-community/segmented-control": "2.1.1",
"@react-native-community/segmented-control": "2.2.1",
"@react-native-community/slider": "3.0.3",
"@react-native-community/viewpager": "4.1.6",
"@react-native-community/viewpager": "4.2.0",
"@types/node": "13.13.2",
"@types/prop-types": "15.7.3",
"@types/react": "~16.9.41",
"@types/react-dom": "16.9.8",
"@types/react-native": "~0.62.13",
"@types/react": "~16.9.35",
"@types/react-dom": "~16.9.8",
"@types/react-native": "~0.63.2",
"@types/react-router-native": "^5.1.0",
"csstype": "^2.6.11",
"expo": "^38.0.0",
"expo-av": "~8.2.1",
"expo-font": "~8.2.1",
"expo-constants": "~9.1.1",
"expo-localization": "~8.2.1",
"expo-web-browser": "~8.2.1",
"react": "16.11.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz",
"react-router-native": "5.1.2",
"expo": "^40.0.0",
"expo-app-loading": "1.0.1",
"expo-av": "~8.7.0",
"expo-constants": "~9.3.3",
"expo-font": "~8.4.0",
"expo-localization": "~9.1.0",
"expo-web-browser": "~8.6.0",
"moment": "2.29.1",
"react": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz",
"react-native-webview": "10.8.2",
"react-router-native": "5.1.2",
"typescript": "~3.9.5",
"url": "~0.11.0",
"moment": "2.29.1"
"url": "~0.11.0"
},
"devDependencies": {
"@babel/core": "^7.9.0",
"babel-preset-expo": "^8.2.3",
"@babel/core": "~7.9.0",
"babel-preset-expo": "8.3.0",
"react-proxy": "^1.1.8"
},
"private": true
Expand Down
5 changes: 3 additions & 2 deletions react-native/src/main/scala/hello/world/LoadFonts.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ import org.scalablytyped.runtime.{StringDictionary, TopLevel}
import slinky.core.facade.Hooks.{useEffect, useState}
import slinky.core.FunctionalComponent
import slinky.native.Text
import typings.expo.components.AppLoading
import typings.expoAppLoading.components.AppLoading
import typings.expoFont.fontTypesMod.FontSource
import typings.expoFont.{mod => Font}

import scala.concurrent.ExecutionContext.Implicits.global
import scala.scalajs.js
import scala.scalajs.js.Promise
import scala.scalajs.js.annotation.JSImport
import scala.util.{Failure, Success}

Expand Down Expand Up @@ -54,7 +55,7 @@ object LoadFonts {
)

state match {
case State.Loading => AppLoading.AutoHideSplash()
case State.Loading => AppLoading.AutoHideSplash(_ => (), () => (), () => Promise.resolve[Unit](()))
case State.Error(msg) => Text()(s"Could not load fonts: $msg")
case State.Success => App()
}
Expand Down
Loading