I am trying to get data from local server but i am failure to connect local server.I am facing "Network request failed" const testScreen= async ()=> { await fetch("http://192.168.56.1:3000/comments") .then((response)=>{ console.log(response.json()) }) .catch((error)=>{ console.log("sorry") console.log(error) }) } …error.. Network request failed at node_moduleswhatwg-fetchdistfetch.umd.js:535:17 in setTimeout$argument_0 at node_modulesreact-nativeLibrariesCoreTimersJSTimers.js:130:14 in _callTimer at node_modulesreact-nativeLibrariesCoreTimersJSTimers.js:383:16 in callTimers at node_modulesreact-nativeLibrariesBatchedBridgeMessageQueue.js:416:4 ..
Category : react-native

Tried to fix the issue in various methods and ways but it’s not fixing. I am not able to know why it’s getting an error I don’t understand the exact issue in the code. Could anyone help with the solution? Below is the pdf file format when i try to upload it’s not uploading properly ..
I want to sort in the order in which there are many matches between the cookup content and the ingredient in the FlatList. My final goal is to list the items in the Card component in the order of the number of matches of content and ingredient. Cookup and ingredient range from 1 to 10, ..
Is there any way I can use a copy of my react native project as my main file and publish on android store. I have a working copy in a different folder and want to use it to replace the code in my main source file. I broke my main project file and cant fix ..
I have a search bar in my React Native app, without context implementation the list displayed properly. But when I implemented Context, the list was not displaying again, only the search bar was displaying, and when I type on the search bar I get this error message; ERROR TypeError: item.indexOf is not a function. (In ..
this._size = { width: e.nativeEvent.layout.width, height: e.nativeEvent.layout.height } let imageWidth = width; let imageHeight = height; let imageRatio = width/height; let targetRatio = this._size.width / this._size.height; let scaleFactor = targetRatio > imageRatio ? this._size.height / imageHeight : this._size.width / imageWidth; let newWidth = imageWidth * scaleFactor; let newHeight = imageHeight * scaleFactor; let OldX = ..
I’m doing a simple social media and when I make a likes system, the state changes on the home page, but not on the profile page and gives such an error cleanup error PostCardController.js import React, { useState } from ‘react’; import { View } from ‘react-native’; // import PropTypes from ‘prop-types’; // Cards import ..
I face big complications here, my app doesnt start up and I get this strange error I havent faced before. Im running my app via Expo, just as a sidenote. [Unhandled promise rejection: TypeError: Network request failed] node_moduleswhatwg-fetchdistfetch.umd.js:535:17 in setTimeout$argument_0 node_modulesreact-nativeLibrariesCoreTimersJSTimers.js:130:14 in _callTimer node_modulesreact-nativeLibrariesCoreTimersJSTimers.js:383:16 in callTimers node_modulesreact-nativeLibrariesBatchedBridgeMessageQueue.js:416:4 in __callFunction node_modulesreact-nativeLibrariesBatchedBridgeMessageQueue.js:109:6 in __guard$argument_0 node_modulesreact-nativeLibrariesBatchedBridgeMessageQueue.js:364:10 in __guard ..
Trying to display the sampe provided in https://gl-react-cookbook.surge.sh/helloblue?blue=0.96&menu=true but no success any idea what is going on here? Tks for your help 😉 this my sample import React from ‘react’; import { StyleSheet } from ‘react-native’; import { Surface } from ‘gl-react-native’; import { Shaders, Node, GLSL } from ‘gl-react’; const styles = StyleSheet.create({ surface: ..
I tried to use information of the initial state in UserContext.js to do user registration, and I used useReducer to change the value of initial state. But when the file Login.js first rendered, the information in the initial state is not updated and returns a null. Can someone help me with this problem Login.js: const ..
Recent Comments