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...

Комментарии • 17

  • @codewithtae6637
    @codewithtae6637 2 месяца назад

    What is your main way of obtaining clients for consulting work?

  • @jimokonma42
    @jimokonma42 Год назад +2

    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?

  • @codewithtae6637
    @codewithtae6637 9 месяцев назад

    What was your client looking for in terms of using webview?

  • @codewithtae6637
    @codewithtae6637 9 месяцев назад

    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?

  • @nikako1889
    @nikako1889 Год назад +1

    will u reupload typing challenge?

  • @antonyleme7602
    @antonyleme7602 11 месяцев назад +1

    I'm getting "requireNativeComponent: RNCWebView was not found in the UIManager". Any thoughts?

    • @thedevenvironment
      @thedevenvironment  11 месяцев назад

      Is this during a build or during runtime? And which environment are you using? (iOS, anddroid?)

    • @antonyleme7602
      @antonyleme7602 11 месяцев назад +1

      @@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

  • @ThomazMartinez
    @ThomazMartinez Год назад +1

    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

    • @thedevenvironment
      @thedevenvironment  Год назад

      Agreed, also kinda annoying how the WebView flashes quickly, although could hide that behind a loading spinner if needed.

  • @DanceManAlex
    @DanceManAlex Год назад +1

    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?

    • @thedevenvironment
      @thedevenvironment  11 месяцев назад

      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.