Using WebViews in React Native + Expo | The Dev Environment
HTML-код
- Опубликовано: 24 авг 2024
- Today we are learning how to use the WebView component in React Native and Expo; this component allows you to inject web content in your app. We also talk about Expo platform specific file extensions.
Expo-Router-Typescript GitHub:
github.com/the...
Expo WebView Documentation:
docs.expo.dev/...
React Native WebView Documentation:
github.com/rea...
Platform Specific File Extensions:
reactnative.de...
What is your main way of obtaining clients for consulting work?
Hi, can I use web view to track a button click? so let's say a user likes a post on a Twitter page on my web view is there a way i can track that?
What was your client looking for in terms of using webview?
Would this be good for this situation: A user puts in an food order on the native app but the details gets pushed to a webview for the server to prepare?
will u reupload typing challenge?
Yes. I’m gonna refilm it there was weird audio issues
I'm getting "requireNativeComponent: RNCWebView was not found in the UIManager". Any thoughts?
Is this during a build or during runtime? And which environment are you using? (iOS, anddroid?)
@@thedevenvironment it seems that now you have to run expo prebuild and then pod install in ios folder to be able to run the webview
Web view is Browser running JS, this is not converting to native code like C++, buulding in pure React Native without WebView nonsense will give you better performance and better App like feel
Agreed, also kinda annoying how the WebView flashes quickly, although could hide that behind a loading spinner if needed.
Hey man question, how would you handle cookies? i can see the httponly cookie being returned but it doesnt set. Is there a work around?
or do i need to handle jwt access and refresh tokens another way for react native web?
so what I do in this case, is I read the cookies (using a library of your choice) and then I save them to asyncStorage on native, so that I can use them to call APIs etc.