reactjs - Requiring 'fetch' is returning an empty object in a React-Native app -


i'm working on second react-native application. had required fetch so:

var fetch = require('fetch'); 

i never installed npm, available default. started new react-native project (after updating react native cli) , when require fetch in same fashion , try call fetch method app crashes , error says

object not function(evaluating 'fetch(api_url, fetchobject)') 

when console out fetch with

console.log(fetch); 

i get

{} 

any suggestions?

alright, looks don't event have require fetch more. it's available globally.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -