expo

Network request failed in react native expo

余生长醉 提交于 2021-01-28 09:52:42
问题 im using expo in react native.i have a problem when post data to api laravel.its say"Network Request Failed".heres my code: i hope you can help me guys thankyou.enter image description here 回答1: I see that your fetch URL is served using an HTTP endpoint. You can only make requests to HTTPS endpoints from react-native projects. A possible workaround is to use ngrok. Just download it and run: ./ngrok http 8000 Since your port number is 8000. It will expose an HTTPS endpoint and replace your

Network request failed in react native expo

瘦欲@ 提交于 2021-01-28 09:49:42
问题 im using expo in react native.i have a problem when post data to api laravel.its say"Network Request Failed".heres my code: i hope you can help me guys thankyou.enter image description here 回答1: I see that your fetch URL is served using an HTTP endpoint. You can only make requests to HTTPS endpoints from react-native projects. A possible workaround is to use ngrok. Just download it and run: ./ngrok http 8000 Since your port number is 8000. It will expose an HTTPS endpoint and replace your

Why does “Native module cannot be null” error occur when I import expo?

会有一股神秘感。 提交于 2021-01-28 08:07:06
问题 I'm using: react-native-cli: 2.0.1 react-native: 0.48.3 npm: 4.6.1 expo: 20.1.3 React Native App is created by command: react-native init And I have used both react-native link and react-native link expo commands Here comes the problem, every time I import expo like so import { Permissions } from 'expo'; Or const Expo = require('expo'); I get this error: BTW, I'm using mac 回答1: do you review this solution in the issues https://github.com/zo0r/react-native-push-notification/issues/160 https:/

React-native: Problem sending log - console.error

对着背影说爱祢 提交于 2021-01-28 00:15:54
问题 I'm working with Expo React native, I'm trying to send POST request to my express server using axios App.js - in my React Axios({ url:'http://172.20.1.19:3001/api/tracking/locator', method:'POST', data:{ test:'wew' }, config:'JSON', headers:{ "Access-Control-Allow-Origin": "*" } }) .then(res=>{ console.log(res) }) .catch(err=>{ console.log(err) }) In node status its 200, but when console.log the response it throws an error console.error. "There was a problem sending log message to your

React Native: Can't find variable: require

自作多情 提交于 2021-01-27 20:51:09
问题 I am trying to modify a react native boilerplate so that I can be run on Android platform. I installed the expo package and added an index.js file on the root directory. But when I run the android code, it raised Can't find variable: require on the bundling phase I uploaded my code here. Does anyone have an idea what I missed here? 回答1: resetting the cache worked for me. On expo expo r -c for pure react native react-native start --reset-cache 回答2: For those whose cache clearing didn't work.

React Native Tab view always has the height equal to height of the highest tab

半世苍凉 提交于 2021-01-27 19:11:05
问题 Introduction I have a FlatList that renders a Tab View in its footer. This Tab View let the user switch between one FlatList or an other. So, these last are sibling FlatLists. Problem The first FlatList "A" has a greater height than the second one "B". When I choose the second list, its height is the same as the "A" FlatList's one. I have reproduced the problem in a snack where you can see a similar code. I recognize that the code is a little long but too simple, just focus only on the parent

How to integrate Paypal using React Native expo?

喜夏-厌秋 提交于 2021-01-27 18:04:11
问题 I am unable to integrate Paypal using React Native expo. It can be possible using WebView, but I don't want to use WebView. 回答1: Seams like your out of luck (Source ), however there is a topic on the roadmap you can upvote ( link ) Another solution that might work if you are willig to make the payment with paypal through google you could implement in app purchases (https://docs.expo.io/versions/latest/sdk/in-app-purchases/) they support paypal purchases ( source ) im not sure if this works

TypeError: firebase.default.messaging is not a function (in '_firebase.default.messaging()','firebase.default.messaging is undefined)

…衆ロ難τιáo~ 提交于 2021-01-27 17:43:04
问题 I want to send notifications using firebase cloud functions so I am trying to get a token using firebase.messaging().getToken() but I keep getting the error: TypeError: firebase.default.messaging is not a function (in '_firebase.default.messaging()','firebase.default.messaging is undefined) I have installed firebase and firebase/messages about 5 different ways but cannot seem to get past this error so I assume that those methods must be outdated or I am doing something very wrong. Here is my

error adding a splash to my expo react native app

老子叫甜甜 提交于 2021-01-27 13:30:55
问题 I have my next splash, my idea is to be able to show my app logo when opening the application and then go to the start of the application, it works fine: import React from 'react'; import { StyleSheet, Image, View, Text } from 'react-native'; import { StackActions, NavigationActions } from 'react-navigation'; export default class Splash extends React.Component { goToScreen(routeName){ const resetAction = StackActions.reset({ index: 0, actions: [NavigationActions.navigate({ routeName:

error adding a splash to my expo react native app

≡放荡痞女 提交于 2021-01-27 13:27:44
问题 I have my next splash, my idea is to be able to show my app logo when opening the application and then go to the start of the application, it works fine: import React from 'react'; import { StyleSheet, Image, View, Text } from 'react-native'; import { StackActions, NavigationActions } from 'react-navigation'; export default class Splash extends React.Component { goToScreen(routeName){ const resetAction = StackActions.reset({ index: 0, actions: [NavigationActions.navigate({ routeName: