expo

Ask to choose Audio file in React Native?

Deadly 提交于 2020-05-30 11:41:19
问题 I have App for upload Songs to our API, but I can't find a library for that, Like RN-image-picker that ask the user which photo he wants to choose, So is there anything like this but for File "especially Audio" I'm trying react-native-fs and use example code snippet he provides in README but when I invoke it I got a function as result in logs chooseFile = () => { RNFS.readDir(RNFS.DocumentDirectoryPath) .then(result => { console.log('GOT RESULT', result); // here i got functions as result //

Ask to choose Audio file in React Native?

跟風遠走 提交于 2020-05-30 11:41:08
问题 I have App for upload Songs to our API, but I can't find a library for that, Like RN-image-picker that ask the user which photo he wants to choose, So is there anything like this but for File "especially Audio" I'm trying react-native-fs and use example code snippet he provides in README but when I invoke it I got a function as result in logs chooseFile = () => { RNFS.readDir(RNFS.DocumentDirectoryPath) .then(result => { console.log('GOT RESULT', result); // here i got functions as result //

Manage environment with expo react native

有些话、适合烂在心里 提交于 2020-05-30 08:46:32
问题 I would like to know how can I manage environment with expo. I tried to follow this article, but I have an error, on detect mode. I replaced import Constants from 'expo'; by import Constants from 'expo-constants';. environment.js /***************************** * environment.js * path: '/environment.js' (root of your project) ******************************/ import Constants from 'expo-constants'; const ENV = { dev: { apiUrl: 'http://localhost.com/api', }, staging: { apiUrl: "https://website

Manage environment with expo react native

感情迁移 提交于 2020-05-30 08:46:04
问题 I would like to know how can I manage environment with expo. I tried to follow this article, but I have an error, on detect mode. I replaced import Constants from 'expo'; by import Constants from 'expo-constants';. environment.js /***************************** * environment.js * path: '/environment.js' (root of your project) ******************************/ import Constants from 'expo-constants'; const ENV = { dev: { apiUrl: 'http://localhost.com/api', }, staging: { apiUrl: "https://website

React navigation 5 hide tab bar from stack navigator

风流意气都作罢 提交于 2020-05-30 07:26:06
问题 I wanted to know how to hide the bottom tab bar from a specific screen inside my stack navigator that is nested on a material bottom tab bar This is my code for my stack navigator import React from 'react'; import { createStackNavigator } from '@react-navigation/stack'; import PondScreen from '../screens/PondScreen/PondScreen'; import PondDetailScreen from '../screens/PondScreen/PondDetailScreen'; const Stack = createStackNavigator(); export function PondStack() { return ( <Stack.Navigator

React Native Expo Environment Variables

雨燕双飞 提交于 2020-05-27 06:46:48
问题 So I'm happy with the concept of environment variables as explained in this article and others https://www.freecodecamp.org/news/how-to-gracefully-use-environment-variables-in-a-react-native-app/ Great, I've got my SOMETHING="something" stored so I can just use env.SOMETHING or whatever The part I'm a little lost on is where you keep the live variables ? I would rather not do a solution like this as it seems you are still keeping your keys quite public and that you are just choosing based on

React Native Expo Environment Variables

女生的网名这么多〃 提交于 2020-05-27 06:46:07
问题 So I'm happy with the concept of environment variables as explained in this article and others https://www.freecodecamp.org/news/how-to-gracefully-use-environment-variables-in-a-react-native-app/ Great, I've got my SOMETHING="something" stored so I can just use env.SOMETHING or whatever The part I'm a little lost on is where you keep the live variables ? I would rather not do a solution like this as it seems you are still keeping your keys quite public and that you are just choosing based on

Should I build a local data layer/app state to maintain state in a React Native/Firestore App?

拟墨画扇 提交于 2020-05-24 02:27:34
问题 A main selling point of Firestore is the ability to use it as a online/offline source of truth. I'm using it in this way right now: updating the Firestore document directly on an action, then listening to Firestore DB changes and mapping this back to local state. However, relying on this latency compensation and mapping back to local state is not sufficient for quick updates (taps, toggles even with a small document size). For example, toggles will "jitter" as the RN toggle presumptively

Should I build a local data layer/app state to maintain state in a React Native/Firestore App?

不想你离开。 提交于 2020-05-24 02:23:27
问题 A main selling point of Firestore is the ability to use it as a online/offline source of truth. I'm using it in this way right now: updating the Firestore document directly on an action, then listening to Firestore DB changes and mapping this back to local state. However, relying on this latency compensation and mapping back to local state is not sufficient for quick updates (taps, toggles even with a small document size). For example, toggles will "jitter" as the RN toggle presumptively

How to deal with custom font and fontWeight with react-native

♀尐吖头ヾ 提交于 2020-05-17 05:49:18
问题 I managed to load custom font on my react-native expo app following the official documentation: const App = () => { let [fontsLoaded] = useFonts({ 'Lato-Regular': require('../assets/fonts/Lato-Regular.ttf'), 'Lato-Bold': require('../assets/fonts/Lato-Bold.ttf'), 'Poppins-Light': require('../assets/fonts/Poppins-Light.ttf'), 'Poppins-Bold': require('../assets/fonts/Poppins-Bold.ttf'), }); So I can use it with the component style: <Text style={{ fontFamily: 'Lato-Bold' }}>Home page.</Text> But