<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Lawrence Strickler</title>
    <description>The latest articles on DEV Community by Lawrence Strickler (@kriss).</description>
    <link>https://dev.to/kriss</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F404032%2F9b10b6a5-982c-4897-9800-b4f2079b598c.jpg</url>
      <title>DEV Community: Lawrence Strickler</title>
      <link>https://dev.to/kriss</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kriss"/>
    <language>en</language>
    <item>
      <title>Cool Flutter Dating App Templates of 2020</title>
      <dc:creator>Lawrence Strickler</dc:creator>
      <pubDate>Mon, 15 Jun 2020 15:51:53 +0000</pubDate>
      <link>https://dev.to/kriss/cool-flutter-dating-app-templates-of-2020-1bce</link>
      <guid>https://dev.to/kriss/cool-flutter-dating-app-templates-of-2020-1bce</guid>
      <description>&lt;p&gt;Flutter can be the UI framework model for every app out there, let alone the dating apps. This app development framework has taken the world by storm with its simplicity, widgets, and pixel-by-pixel based mobile UI development. There is no doubt of the popularity this mobile development framework received over the last few years. In this article we are listing the best Flutter Dating app templates of 2020, which you can find on the Internet right now.&lt;/p&gt;

&lt;p&gt;For those not familiar with Flutter yet, simply put, apps developed using Flutter are beautiful and feature-rich. Flutter makes the app development simpler by offering different Widgets. Basically, the application interface is coded by stacking the Widget tree with different Widgets. The development environment is powered by the Dart programming language. It is a Google-developed programming language similar to Java programming language.&lt;/p&gt;

&lt;p&gt;The learning curve of Flutter and Dart programming language is quite flat and easy. It offers cross-platform application development. This means the same piece of code can be used to create both Android and iOS-based applications. Flutter offers many libraries out of the box. Not to mention that a plethora of libraries are out there which a flutter developer can use to easily implement wonderful mobile app features.&lt;/p&gt;

&lt;p&gt;Flutter is the perfect UI framework to build a snappy &amp;amp; hot mobile dating app for both iOS and Android. By using one of the best Flutter dating app templates, you can create a dating app much more quickly, even in a matter of days.&lt;/p&gt;

&lt;p&gt;So, here we are going to talk about the popular dating app templates implemented using Flutter. With the popularity of Flutter mobile application development, why not create a dating application using Flutter? Dating apps are not new to this mobile application development concepts. There are numerous dating apps in the market already.&lt;/p&gt;

&lt;p&gt;You may have heard about Tinder, one famous in the current generation. These apps are now often developed to fit into a specific society or culture. Tinder makes use of your geographical position to find other singles in your neighborhood. Thus, it shows you their profiles which consist of a picture, a name, age, and distance. So, you are able to connect. These apps are becoming a normal way for people to connect and meet nowadays. Hence, there is a high demand for dating apps in the market.&lt;/p&gt;

&lt;p&gt;Here, we are not going to get into the details of how to create the dating app using Flutter. But, we will go through some of the most popular open-source dating app templates implemented using Flutter. This will make things easier for the developers to learn and develop the dating app using Flutter and also add additional features to them.&lt;/p&gt;

&lt;p&gt;Now, without further ado let us take a look at the best flutter dating app templates that you can choose from to develop your own dating app clone.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mBCXAdsW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/iamabhishek229313/tinder_clone" alt="Open-source Tinder Clone"&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--R2gb3cY_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.instaflutter.com/wp-content/uploads/2020/06/iamabhishek229313_tinder_clone_For_learning_.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--R2gb3cY_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.instaflutter.com/wp-content/uploads/2020/06/iamabhishek229313_tinder_clone_For_learning_.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Open-source Tinder Clone&lt;/p&gt;

&lt;p&gt;Tinder is not a new topic when it comes to dating apps. It is one of the most popular dating application out there in the market. It has more than 100 million downloads worldwide. This template is based on the swipe mechanism. The original app was developed using Java for Native Android development and Objective-C for iOS development. But, here we have got the Tinder clone template developed entirely using Flutter. This template was originally designed for the purpose of learning flutter. But, the originality of the UI compared with the original app can be considered very much similar.&lt;/p&gt;

&lt;p&gt;The UI is intuitive and simple based on the swipe mechanism of Tinder. There is no doubt that this template can be used to implement your very own tinder clone application or other dating application. Of course, this project can be used as a learning guide to flutter beginners. However, this template can give a basis for your next dating app startup. As this an open-source template, it is available freely in GitHub.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.instaflutter.com/design/best-flutter-dating-app-templates/"&gt;Flutter Dating App Template&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jessf4El--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.instaflutter.com/wp-content/uploads/2019/02/dating-app-template-flutter.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jessf4El--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.instaflutter.com/wp-content/uploads/2019/02/dating-app-template-flutter.png" alt="Alt"&gt;&lt;/a&gt;&lt;br&gt;
This is one of the best premium dating app templates out there which has features that are extremely close to the Tinder app. It offers a fully functional dating app template with Firebase server backend support. This template is entirely written in Flutter. The UI flow and designs are inspired by the Tinder UI Kit.&lt;/p&gt;

&lt;p&gt;This Flutter template supports the match-making algorithm along with notifications and real-time messaging. The design implementation supports both Android and iOS platforms. The template offers more than 50+ screens with intuitive design elements for ease and efficiency. Inspired by the Tinder app, this app also incorporates the swipe mechanism along with date recommendations.&lt;/p&gt;

&lt;p&gt;The features like matches, real-time conversations, dating/personal profiles, localizations are a must-have in any dating app. Thus, this template takes an extra effort to provide these features with optimized performance. The new Android feature like dark-mode support is also supported. Not to forget, the server backend support using Firebase.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hookup4u – A Complete Flutter Based Dating App
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nwGLCo3V--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.instaflutter.com/wp-content/uploads/2020/06/Hookup4u_%25E2%2580%2593_A_Complete_Flutter_Based_Dating_App_by_deligence_CodeCanyon.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nwGLCo3V--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.instaflutter.com/wp-content/uploads/2020/06/Hookup4u_%25E2%2580%2593_A_Complete_Flutter_Based_Dating_App_by_deligence_CodeCanyon.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you’re looking to buy Flutter app templates, this one is for sale. Hookup4u is a complete feature-full dating app template implemented using Flutter. It is available in the CodeCanyon market for sale for $69. It offers more than 40 screens. Each screen exhibits the intuitive UI feel with features matching that of the fully functional dating app. Nowadays, security has been one of the most important features that must be included in every app. This app offers authentication using Facebook as well as OTP based Phone number verification. This template delivers an easy input UI for profile creation and gallery for picture upload.&lt;/p&gt;

&lt;p&gt;The template also incorporates the Tinder based swipe mechanism along with like, unlike the other’s profile feature. It supports real-time Notifications and one to one chat as well. The control over the profile visibility can also be set using the settings option. So overall, this template delivers powerful features required for an ideal dating app. Thus, do not restrain yourself for checking this professional template out.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pawdoption – open-source Tinder for pet
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gX6-cHbS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.instaflutter.com/wp-content/uploads/2020/06/image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gX6-cHbS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.instaflutter.com/wp-content/uploads/2020/06/image.png" alt=""&gt;&lt;/a&gt;&lt;br&gt;
Here’s one of the best free Flutter dating app templates out there. The popularity of dating apps like Tinder has grown so much that now there is a template that helps the pet lovers met their dream pets. This template can be considered Tinder for the adoption of pets that match the pet lovers’ requirements.&lt;/p&gt;

&lt;p&gt;The features in this template enable you to find your next pet from local animal shelters. Inspired by the Tinder UI kit, there is a swipe mechanism. It enables you to swipe through pets in a Tinder-like interface to search for your next pet. The right swipe gesture will bookmark the pet so that you can view them later. It also delivers the interface to include pets bios such as breed, age, and shelter location. The contact information is also available in the interface as there can not be a real-time chatting with pets.. haha!!&lt;/p&gt;

&lt;p&gt;We recommend you to check this interesting template out. It may prove to be fruitful in implementing your own dating app. Most importantly, this template is an open-source template and is available freely in the Github repo linked above.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;People are more engaged in virtual life than interactive in the social life. In a world where people tend to stay active virtually, dating apps can provide a place where people can connect virtually and meet in person. Hence, many prevalent dating apps like Tinder, Happn, Bumble, Honeym etc. are the talk of the town. Thus, helping many users connect. Therefore, the list of the best Flutter dating app templates provided above can enable you to create your very own similar dating app. The templates are open-source as well as premium. We leave it upon you to decide which one best suits your needs. There is no doubt that they are equipped with features that can fulfill everything that you want in your dating application.&lt;/p&gt;

&lt;p&gt;The major point is that they are entirely written in the Flutter framework with Dart programming language. The cross-platform compatibility can help you deploy the app for both Android and iOS platforms. There is a high probability that Flutter app development can be the future of mobile application development. So, there is more to gain than to lose learning Flutter and checking out these awesome templates which will surely simplify your development activity.&lt;/p&gt;

&lt;p&gt;This is the list of the best Flutter dating app templates of 2020, currently available on the market. If you know of more such app themes, let us know in the comment.&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>fluttertemplate</category>
    </item>
    <item>
      <title>What is React Native WebView ?</title>
      <dc:creator>Lawrence Strickler</dc:creator>
      <pubDate>Sat, 06 Jun 2020 00:55:15 +0000</pubDate>
      <link>https://dev.to/kriss/what-is-react-native-webview-1i5l</link>
      <guid>https://dev.to/kriss/what-is-react-native-webview-1i5l</guid>
      <description>&lt;p&gt;In React Native, WebViews enable access to any web portal in the mobile app itself. In other words, a web view allows us to open the web URLs inside the app interface. While React Native provides us with a built-it web view component, but we are going to use &lt;a href="https://github.com/react-native-community/react-native-webview"&gt;react-native-webview&lt;/a&gt; plugin in this tutorial, since it is more powerful. React Native WebView is a modern, well-supported, and cross-platform WebView for React Native.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XbZADmKH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.instamobile.io/wp-content/uploads/2020/06/Implementing-React-Native-WebView-in-React-Native-1024x576.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XbZADmKH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.instamobile.io/wp-content/uploads/2020/06/Implementing-React-Native-WebView-in-React-Native-1024x576.png" alt="react native webview"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The built-in Webview from React Native is to be deprecated pretty soon based on this &lt;a href="https://github.com/react-native-community/discussions-and-proposals/pull/3"&gt;document&lt;/a&gt;. Hence, this plugin serves as the replacement for the built-in web view. This plugin is a third-party plugin supported by the react-native community.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Requirements&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The requirements to follow this tutorial are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Nodejs &lt;code&gt;&amp;gt;=8.x.x&lt;/code&gt; with npm or yarn installed as a package manager.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://facebook.github.io/watchman/"&gt;watchman&lt;/a&gt; a file watching service.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.npmjs.com/package/react-native-cli"&gt;react-native-cli&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Getting Started with React Native WebView&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;In order to get started with web view configuration, we need to install the actual plugin first. Here, we are using yarn to install the plugin but we can use NPM (Node Package Manager) as well. Hence, in order to install the plugin, we need to run the following command in the command prompt of our project folder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yarn add react-native-webview
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;If the react-native version is equal or greater than 0.60 then, the installation also takes care of auto-linking the plugin to native configurations. But, in the case of earlier versions, we may need to run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;react-native link react-native-webview
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h5&gt;
  
  
  &lt;strong&gt;iOS&lt;/strong&gt;
&lt;/h5&gt;

&lt;p&gt;In the case of iOS, we also need to run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pod install
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h5&gt;
  
  
  &lt;strong&gt;Android&lt;/strong&gt;
&lt;/h5&gt;

&lt;p&gt;In the case of Android, this module does not require any extra step after running the link command. But for the react-native-webview version &amp;gt;=6.X.X, we need to make sure AndroidX is enabled in our project. This can be done by editing &lt;code&gt;android/gradle.properties&lt;/code&gt; and adding the following lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;android.useAndroidX=true
android.enableJetifier=true
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This completes our installation steps. We can now use the plugin in our react native project.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Loading Inline HTML using React Native WebView&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;First, we are going to load a simple HTML content into our app interface. For that, we need to add the following imports in our &lt;em&gt;App.js&lt;/em&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Component&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;WebView&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react-native-webview&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Here, we have imported the &lt;code&gt;WebView&lt;/code&gt; component from the &lt;em&gt;react-native-webview&lt;/em&gt; plugin. Now, we can make use of this component in order to load the HTML content as shown in the code snippet below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Component&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;WebView&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react-native-webview&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;MyInlineWeb&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nx"&gt;Component&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;render&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;WebView&lt;/span&gt;
        &lt;span class="nx"&gt;originWhitelist&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;*&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]}&lt;/span&gt;
        &lt;span class="nx"&gt;source&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt; &lt;span class="na"&gt;html&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;&amp;lt;h1&amp;gt;This is a static HTML source!&amp;lt;/h1&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}}&lt;/span&gt;
      &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Here, we have defined the &lt;code&gt;MyInlineWeb&lt;/code&gt; class component. This class component has a &lt;code&gt;render()&lt;/code&gt; function that renders the &lt;code&gt;WebView&lt;/code&gt;component. The &lt;code&gt;WebView&lt;/code&gt; component has the HTML content configured to its &lt;code&gt;source&lt;/code&gt; prop. As a result, we can see the HTML content is rendered in the app interface as shown in the emulator screenshot below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3amaNomB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.instamobile.io/wp-content/uploads/2020/06/1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3amaNomB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.instamobile.io/wp-content/uploads/2020/06/1.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Loading Remote URL&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Now, instead of simple HTML content, we are going to load the entire website content from the remote URL. For that, we need to provide the &lt;code&gt;uri&lt;/code&gt; option to the &lt;code&gt;source&lt;/code&gt; prop of &lt;code&gt;WebView&lt;/code&gt; component as shown in the code snippet below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Component&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;WebView&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react-native-webview&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;MyWeb&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nx"&gt;Component&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;render&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;WebView&lt;/span&gt; &lt;span class="nx"&gt;source&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt; &lt;span class="na"&gt;uri&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://instamobile.io/blog&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}}&lt;/span&gt; &lt;span class="sr"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="err"&gt;;
&lt;/span&gt;  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Hence, we will get the entire webpage of the website opened in the app’s web view itself as shown in the screenshot below:&lt;br&gt;&lt;br&gt;
 &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kQG1DED5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.instamobile.io/wp-content/uploads/2020/06/2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kQG1DED5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.instamobile.io/wp-content/uploads/2020/06/2.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  &lt;strong&gt;Adding a loading spinner to React Native Webview&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;While accessing the URL from the &lt;code&gt;WebView&lt;/code&gt; component, it may take some time for entire HTML content on the website to load. So, in order to represent the delay, we are going to display a loading indicator until the website loads. For this, we need to import the &lt;code&gt;ActivityIndicator&lt;/code&gt; component from the react-native package as shown in the code snippet below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;View&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;StyleSheet&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ActivityIndicator&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react-native&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now, we need to make use of the &lt;code&gt;ActiviIndicator&lt;/code&gt; component in our project. For that, we are going to create a function called &lt;code&gt;LoadingIndicatorView()&lt;/code&gt; which will return the &lt;code&gt;ActivityIndicator&lt;/code&gt; as shown in the code snippet below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;View&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;StyleSheet&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;ActivityIndicator&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react-native&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;WebView&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react-native-webview&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Card&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react-native-paper&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
 &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;LoadingIndicatorView&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ActivityIndicator&lt;/span&gt; &lt;span class="nx"&gt;color&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#009b88&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="nx"&gt;size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;large&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;App&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
   &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;WebView&lt;/span&gt;
        &lt;span class="nx"&gt;originWhitelist&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;*&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]}&lt;/span&gt;
        &lt;span class="nx"&gt;source&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt; &lt;span class="na"&gt;uri&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://instamobile.io/blog&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}}&lt;/span&gt;  
        &lt;span class="nx"&gt;renderLoading&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;LoadingIndicatorView&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="nx"&gt;startInLoadingState&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Here, we have used the &lt;code&gt;AcitivityIndicator&lt;/code&gt; with &lt;code&gt;color&lt;/code&gt; and &lt;code&gt;size&lt;/code&gt; props. Then, we have invoked the &lt;code&gt;LoadingIndicatorView&lt;/code&gt; function onto the &lt;code&gt;renderLoading&lt;/code&gt; prop of the &lt;code&gt;WebView&lt;/code&gt; component. This allows us to display the loading indicator until the website fully loads. We can see that &lt;code&gt;startInLoadingState&lt;/code&gt; prop is also used here. This boolean value forces the &lt;code&gt;WebView&lt;/code&gt; to show the loading view on the first load. This prop must be set to &lt;code&gt;true&lt;/code&gt; in order for the &lt;code&gt;renderLoading&lt;/code&gt; prop to work.&lt;br&gt;&lt;br&gt;
As a result, we get the following result in our emulator simulation:&lt;br&gt;&lt;br&gt;
 &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HbBaWkXQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.instamobile.io/wp-content/uploads/2020/06/3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HbBaWkXQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.instamobile.io/wp-content/uploads/2020/06/3.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;In this tutorial, we learned about the web view property of React Native. Since the in-built web-view feature of React Native is to be deprecated, we learned how to make use of the third party web view plugin named _ &lt;strong&gt;react-native-webview&lt;/strong&gt; _. First, we learned how to render the simple HTML content using the WebView component. Then, we got a detailed explanation of how to use the WebView component and its props to render the entire HTML content from the URL along with the loading indicator. In case you want to learn more, you can go-ahead to the&lt;a href="https://github.com/react-native-community/react-native-webview"&gt;main repository&lt;/a&gt; for discussion regarding this web view plugin.&lt;/p&gt;

&lt;p&gt;At Instamobile, we used a webview to automatically display all the web pages of a WordPress site, as part of our &lt;a href="https://www.instamobile.io/app-templates/react-native-wordpress-app/"&gt;React Native WordPress app&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The post &lt;a href="https://www.instamobile.io/react-native-tutorials/react-native-webview/"&gt;React Native WebView – Loading Websites and HTML in React Native&lt;/a&gt; appeared first on &lt;a href="https://www.instamobile.io"&gt;instamobile&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>reactnativewebview</category>
      <category>webview</category>
    </item>
  </channel>
</rss>
