You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am doing a project in react -native but when executing my project I am getting the following error:
[Unhandled promise rejection: SyntaxError: JSON Parse error: Unexpected identifier "An"]
Stack trace:
[native code]:null in parse
node_modules/promise/setimmediate/core.js:37:14 in tryCallOne
node_modules/promise/setimmediate/core.js:123:25 in setImmediate$argument_0
node_modules/react-native/Libraries/Core/Timers/JSTimers.js:146:14 in _callTimer
node_modules/react-native/Libraries/Core/Timers/JSTimers.js:194:17 in _callImmediatesPass
node_modules/react-native/Libraries/Core/Timers/JSTimers.js:458:30 in callImmediates
[native code]:null in callImmediates
node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:407:6 in __callImmediates
node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:143:6 in __guard$argument_0
node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:384:10 in __guard
node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:142:17 in __guard$argument_0
[native code]:null in flushedQueue
[native code]:null in invokeCallbackAndReturnFlushedQueue
...
import React from 'react';
import { View, Text, } from 'react-native';
import UseFetch from '../hooks/useFetch';
export default ({ navigation }) => {
const id = navigation.getParam('_id');
const { loading, dato } = UseFetch(`https://serverless.mgyavega.now.sh/api/meals/${id}`);
console.log( dato );
return (
loading ? <Text>Cargando </Text> :
<View>
<Text> </Text>
<Text> </Text>
</View>
)
}
I could not obtain the _id of the dishes in the Modal, when creating the console.log it indicates that the value is undefined, but when doing the console.log of the database in the method of the console.log modal (data) ; If you show me the data record but it first comes out empty and then the data in the record goes out twice, but in the execution, the error I indicated appears.
I appreciate the collaboration you can provide me.
Thank you.
Mari
The text was updated successfully, but these errors were encountered:
Hello.
I am doing a project in react -native but when executing my project I am getting the following error:
My code is as follows:
App.js
Meals.js
ListItem.js
UseFetch.js
Modal.js
I could not obtain the _id of the dishes in the Modal, when creating the console.log it indicates that the value is undefined, but when doing the console.log of the database in the method of the console.log modal (data) ; If you show me the data record but it first comes out empty and then the data in the record goes out twice, but in the execution, the error I indicated appears.
I appreciate the collaboration you can provide me.
Thank you.
Mari
The text was updated successfully, but these errors were encountered: