expo

How to reduce the size of an expo/react-native app on Android

Deadly 提交于 2019-12-17 17:41:40
问题 I am developing a small dictionary app by using react native with expo. As I am compiling to Apk file. The size goes up to 30mb and after having installed on a device, it goes to 80mb. Is this normal? Are there any ways to reduce the size of the app? Thank you guys. 回答1: expo is for testing the app you should migrate to react-native for production make a new react app " react-native init " Copy the source files over from Expo project Install all dependencies of the Expo project except Expo

Getting the following error while executing expo init command

爱⌒轻易说出口 提交于 2019-12-17 17:22:08
问题 Installing dependencies... npm WARN deprecated core-js@1.2.7: core-js@<2.6.5 is no longer maintained. Please, upgrade to core-js@3 or at least to actual version of core-js@2. npm ERR! path git npm ERR! code ENOENT npm ERR! errno ENOENT npm ERR! syscall spawn git npm ERR! enoent Error while executing: npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/expo/react-native-maps.git npm ERR! enoent npm ERR! enoent npm ERR! enoent spawn git ENOENT npm ERR! enoent This is related to npm

Hide header in stack navigator React navigation

廉价感情. 提交于 2019-12-17 15:28:06
问题 I'm trying to switch screen using both stack and tab navigator. const MainNavigation = StackNavigator({ otp: { screen: OTPlogin }, otpverify: { screen: OTPverification}, userVerified: { screen: TabNavigator({ List: { screen: List }, Settings: { screen: Settings } }), }, }); In this case stacknavigator is used first and then tabnavigator. and i want to hide headers of stack navigator. WIt is not working properly when i use navigationoptions like:: navigationOptions: { header: { visible: false

Hide header in stack navigator React navigation

元气小坏坏 提交于 2019-12-17 15:27:33
问题 I'm trying to switch screen using both stack and tab navigator. const MainNavigation = StackNavigator({ otp: { screen: OTPlogin }, otpverify: { screen: OTPverification}, userVerified: { screen: TabNavigator({ List: { screen: List }, Settings: { screen: Settings } }), }, }); In this case stacknavigator is used first and then tabnavigator. and i want to hide headers of stack navigator. WIt is not working properly when i use navigationoptions like:: navigationOptions: { header: { visible: false

Can't seem to load custom fonts with Expo's Font.loadAsync

安稳与你 提交于 2019-12-14 02:19:32
问题 I'm using React Native with Expo, and it is all going well except for this one issue with custom fonts. I have my font Lobster-Regular.ttf in ./assets/fonts, and I have been trying to load it as seen in the official docs: componentDidMount() { Font.loadAsync({ 'Lobster': require('./assets/fonts/Lobster-Regular.ttf'), }); } I then style my header as such: headerText: { color: 'white', fontSize: 30, fontFamily: 'Lobster' }, All I get is fontFamily 'Lobster' is not a system font and has not been

Importing the graph kit in React Native results in error 500

徘徊边缘 提交于 2019-12-14 02:14:29
问题 I am using the latest version of Expo. I have created a project by expo init my_project and added the React Native Chart Kit. Here is the package.json: { "main": "node_modules/expo/AppEntry.js", "scripts": { "start": "expo start", "android": "expo start --android", "ios": "expo start --ios", "web": "expo start --web", "eject": "expo eject" }, "dependencies": { "expo": "^35.0.0", "react": "16.8.3", "react-dom": "16.8.3", "react-native": "https://github.com/expo/react-native/archive/sdk-35.0.0

What are React Native's caching behaviors for fetch

こ雲淡風輕ζ 提交于 2019-12-13 19:18:33
问题 What currently are React Native's default behaviors for caching in fetch calls? The official FB guides simply say "look at Mozilla!" but we're not on a web browser. I would assume cache behavior is custom here as result of the middleware. Let's say I do: fetch("https://exampleserver.com/myfile.json") Are requests automatically cached once called? Is the request contents of myfile.json cached the entire "session" (ie: App is running active/bg, but not forced closed by user). Where is the

How to configure Jest to work with Expo SDK 32

会有一股神秘感。 提交于 2019-12-13 16:45:06
问题 I have an Expo app and was using SDK 28. My team decided we should update to the latest version, that meant updating React Native (Since the latest SDK uses RN 0.57) and Babel. When we updated our dependencies, and fixed our config files, Jest started to give us this error: TypeError: Cannot read property 'fetch' of undefined at node_modules/react-native/Libraries/vendor/core/whatwg-fetch.js:6:12 at Object.<anonymous> (node_modules/react-native/Libraries/vendor/core/whatwg-fetch.js:486:3) at

Qr-code decoder from image file (react native)

半腔热情 提交于 2019-12-13 14:24:05
问题 Im looking for a Way to decode qr-code from image file in react native (ios specifically)... I know expo provides camera scanner solution ... But im in need for file decoder Any help is very much appreciated. 回答1: You can use the jsQR library to read QR codes from image files. To choose a file from storage you can try the React Native Image Picker library. 回答2: May be you can use this react-native-qrcode-local-image 来源: https://stackoverflow.com/questions/51920987/qr-code-decoder-from-image

Sending states between screens react native

旧时模样 提交于 2019-12-13 05:09:46
问题 Am currently working with an app that will provide you with a class/race/background story from an fantasy api. I used expo's tab template when i created the project. So my question is how would I send data that i fetched in my Race screen to my background-story screen in order to fetch the correct background-story? I've been trying to googling it but couldnt find an answer that helped, the only thing i found is that its something to do with the navigator, hence why i link it. Maintabnavigator