Coming from years of web developing React-Native feels like a fresh start to me. You get better access to native functionality AND you have fewer r...
For further actions, you may consider blocking this person and/or reporting abuse
Glad this article is still helpful after all that time :D
Hello K, great post learned a lot I didnt know this was possible using fetch. Just one quick question. How would you manage if you wanted to fetch some quick data in front end (react) but had to enter information in an input tag and maybe even click a button? I hope you can help me out a bit
Glad you liked it.
I'd use React hooks.
That is great I think that might works thanks a lot! I'm just trying to figure out this error:
Access to fetch at 'MyUrl' from origin 'localhost:8100' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's. I've found to fix it adding {mode:"no-cors"} in the fetch call but the object returns null. Do you know anything about this kind of error?
Hi K, this awesome post.
So already try and it's working fine,
But I have some problem,
I try scrape from streaming service website (anime).
But there are no video tag inside the website.
So I try to inspect element, then I saw that website need to click "play" button then I got ifarame embedded html document with video tag.
So how can i do click on cheerio then get embeded video?
Thanks
Sorry, I don't know if Cheerio works with JavaScript sites.
One way to solve this would be to check if you could calculate the video URL from the data that is already in the HTML.
Otherwise I don't know.
why Async ? what if just fetch ?
You can use fetch without async/await. React-Native supports async/await, that's why I used it, but it isn't needed, you can use promises directly :)
Nice one! I had no clue there was a jquery-like tool for RN. Very useful.
Hi K, could the above crawling applies to reactjs or only to react native?
Only React-Native, because you can't access other websites from within a browsers, just sites from the same domain or such that are CORS enabled.
Please go in depth, i couldn't get cheerio-without-node-native to work
There's also react-native-cheerio, I've not yet used it myself but, obviously, I'm doing the research, also.
No, it's not working. ERROR.
ESLint Parsing error: Unexpected token
I'm new to this react native thing... I've tried your exact method as of now yet nothing is displayed on my react native mobile app.
I'm new to this so your help will matter alot.
There's no error but also nothing's displayed.