Soy nuevo en reaccionar nativo, estoy tratando de acceder a la URL remota arroja este error. "undefined no es una función que evalúe ((0,_reactNative.fetch)". No estoy seguro de lo que estoy haciendo mal; por favor ayuda. Estoy usando la última versión de react native 0.40
import React, { Component } from "react"; import { View, Text, Button, fetch, NativeModules, NativeEventEmitter } from "react-native"; export default class VideoScreen extends Component { componentDidMount(){ this.video(); } video(){ fetch('http://localhost:4200/token').then(function(res) { console.log(res.json()); }) } }eliminar fetch de la declaración de importación hace que funcione.
import { View, Text, Button, NativeModules, NativeEventEmitter } from "react-native";Tuve el mismo problema y se resolvió agregando este código a App.js:
if(typeof global.self === "undefined") { global.self = global; }