<?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>Forem: Irshad Ali</title>
    <description>The latest articles on Forem by Irshad Ali (@phonerefer).</description>
    <link>https://forem.com/phonerefer</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%2F248188%2Fb56d33d7-5d1a-484b-9e02-85375e576af3.png</url>
      <title>Forem: Irshad Ali</title>
      <link>https://forem.com/phonerefer</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/phonerefer"/>
    <language>en</language>
    <item>
      <title>Styling in React JS</title>
      <dc:creator>Irshad Ali</dc:creator>
      <pubDate>Sat, 14 Dec 2019 14:08:50 +0000</pubDate>
      <link>https://forem.com/phonerefer/styling-in-react-js-mig</link>
      <guid>https://forem.com/phonerefer/styling-in-react-js-mig</guid>
      <description>&lt;h2&gt;
  
  
  Inline Styling
&lt;/h2&gt;

&lt;p&gt;Inline styles are nothing new,they are a HTML feature that we've all most likely used at some point. However,implementing inline styles in React is&lt;br&gt;
slightly different,we store the values as objects.&lt;/p&gt;
&lt;h3&gt;
  
  
  Inline object definition
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div style={{backgroundColor: "green" }}&amp;gt; IRSHAD ALI &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Object literal definition
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const divStyle = {backgroundColor: "green" }
&amp;lt;div sstyle={divStyle}&amp;gt; IRSHAD ALI &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Whilst inline style are often used when applying conditional style, they are often not the best choice when more than one element requires the same&lt;br&gt;
styling.&lt;/p&gt;
&lt;h3&gt;
  
  
  CSS &amp;amp; CSS Pre-processors
&lt;/h3&gt;

&lt;p&gt;Whilst the process of using vanilla CSS or a CSS pre-processor is the same in React, there are a couple of notable differences. When applying&lt;br&gt;
classes to elements, we use the 'className' syntax rather then 'class'. We also link our stylesheet using the @import syntax.&lt;/p&gt;
&lt;h3&gt;
  
  
  For CSS
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from 'react'
import './App.css'

const App = () =&amp;gt; {
  return &amp;lt;Dogs/&amp;gt;
  }
export default App;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  CSS Modules
&lt;/h3&gt;

&lt;p&gt;CSS Modules are simply &lt;code&gt;.css&lt;/code&gt; file in which all CSS style and animation are defined. With an exception all of the style declared are locally&lt;br&gt;
scoped to the Component they are imported into.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.dogSounds{
font-size: 1.5rem;
color: green;
text-decoration: underline;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All CSS style for one component are declared in one file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from 'react'
import style form "./dog.css";

const Dog = () =&amp;gt; {
  return &amp;lt;h1 style={style.dogSounds}&amp;gt; woof&amp;lt;/h1&amp;gt;
}

export default Dog;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  CSS-in-JS Libraries
&lt;/h2&gt;

&lt;p&gt;CSS-in-JS and inline style are extremely similar. However with inline styles React attaches the style to the DOM nodes,where as CSS-IN-JS libraries&lt;br&gt;
 take your styles and inject them into a &lt;code&gt;&amp;lt;style&amp;gt;&lt;/code&gt; tag in the DOM.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install --save styled-components
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Can also b declared in another file and impored in&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import styled from 'styled-components

const Title = styled,h1`
  font-size: 1.5em;
  color: green;
  text-align: center;
  `;

  **//IN COMPONENT**
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  &amp;lt;Title&amp;gt;
    Heloo World!
  &amp;lt;/Title&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Thank's To @TheTraveling.Dev
&lt;/h4&gt;

</description>
      <category>react</category>
      <category>css</category>
      <category>javascript</category>
      <category>html</category>
    </item>
    <item>
      <title>How To Redirecting All Traffic To Netlify</title>
      <dc:creator>Irshad Ali</dc:creator>
      <pubDate>Wed, 04 Dec 2019 14:09:39 +0000</pubDate>
      <link>https://forem.com/phonerefer/how-to-redirecting-all-traffic-to-netlify-4l29</link>
      <guid>https://forem.com/phonerefer/how-to-redirecting-all-traffic-to-netlify-4l29</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;Redirecting In Netlify&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;When we deploy a site in Netlify everything works pretty fin but when it comes to routing there are some errors like when we navigate to &lt;strong&gt;Blog&lt;/strong&gt; page in a site it takes us to &lt;code&gt;yoursite.com/blog&lt;/code&gt; that's fin. But! When we refresh that same page then we see this screen.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--koZqjlnN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/phonerefer/image/upload/v1575466406/vjb3zsaguktyk36rnkwh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--koZqjlnN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/phonerefer/image/upload/v1575466406/vjb3zsaguktyk36rnkwh.png" alt="Errror" title="Error" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  To solve this problem
&lt;/h3&gt;

&lt;p&gt;Thankfully,Netlify provides us a way to do this via a &lt;code&gt;_redirects&lt;/code&gt; file. You need to make sure that this file sits at the root of your build directory.&lt;/p&gt;

&lt;h3&gt;
  
  
  So what to do?
&lt;/h3&gt;

&lt;p&gt;Just create a new file with the name of &lt;code&gt;_redirects&lt;/code&gt; and put this file in the root folder of your site. Then after add below code in that file. That's it&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/* /index.html 200
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Above line states that we want all paths redirected to &lt;code&gt;/index.html&lt;/code&gt; with response of 200.&lt;/p&gt;
&lt;/blockquote&gt;



&lt;h2&gt;
  
  
  Even you can redirects and rewrites
&lt;/h2&gt;

&lt;p&gt;Add one or more redirects tables to your Netlify configuration file. This method allows for more structured configuration and additional capabilities, as described in the Netlify configuration file syntax section below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;home                     /
/blog/my-post.php        /blog/my-post
/news                    /blog
/cuties                  https://www.yoursite.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can customize and alter the redirect behavior by adding options to the end of each line. Visit the redirect options and rewrites and proxies docs for more details.&lt;/p&gt;

&lt;h3&gt;
  
  
  Syntax
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;from&lt;/code&gt;: The path you want to redirect.&lt;br&gt;
&lt;code&gt;to&lt;/code&gt;: The URL or path you want to redirect to.&lt;br&gt;
&lt;code&gt;status&lt;/code&gt;: The HTTP status code you want to use in that redirect; 301 by default.&lt;/p&gt;

</description>
      <category>html</category>
      <category>javascript</category>
      <category>netlify</category>
      <category>hosting</category>
    </item>
    <item>
      <title>Convert React App into a Progressive Web App (PWA)</title>
      <dc:creator>Irshad Ali</dc:creator>
      <pubDate>Mon, 02 Dec 2019 17:06:12 +0000</pubDate>
      <link>https://forem.com/phonerefer/convert-react-app-into-a-progressive-web-app-pwa-b0f</link>
      <guid>https://forem.com/phonerefer/convert-react-app-into-a-progressive-web-app-pwa-b0f</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fphonerefer%2Fimage%2Fupload%2Fc_scale%2Ch_50%2Cw_150%2Fv1573154075%2Firshadali.site%2Fwd0dusiqooqdg81ygqxj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fphonerefer%2Fimage%2Fupload%2Fc_scale%2Ch_50%2Cw_150%2Fv1573154075%2Firshadali.site%2Fwd0dusiqooqdg81ygqxj.png" title="PWA" alt="PWA"&gt;&lt;/a&gt;      &lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fprvnbist%2Fimage%2Fupload%2Fc_scale%2Ch_80%2Fv1564054850%2FReact.js_logo-512_bvpygm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fprvnbist%2Fimage%2Fupload%2Fc_scale%2Ch_80%2Fv1564054850%2FReact.js_logo-512_bvpygm.png" title="ReactJs" alt="ReactJs"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  What is a PWA?
&lt;/h1&gt;

&lt;p&gt;Progressive Web Apps are user experiences that have the reach of the web, and are:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;b&gt;Reliable&lt;/b&gt; - Load instantly and never show the downasaur, even in uncertain network conditions.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;&lt;b&gt;Fast&lt;/b&gt; - Respond quickly to user interactions with silky smooth animations and no janky scrolling.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;&lt;b&gt;Engaging&lt;/b&gt; - Feel like a natural app on the device, with an immersive user experience.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This new level of quality allows Progressive Web Apps to earn a place on the user's home screen.&lt;/p&gt;
&lt;h1&gt;
  
  
  1. Register a Service Worker
&lt;/h1&gt;

&lt;p&gt;&lt;b&gt;What is a service worker?&lt;/b&gt;&lt;br&gt;
Service workers (client-side proxies that pre-cache key resources) enable PWAs to load instantly and provide an instant,&lt;br&gt;
reliable experience for users, regardless of the network state.&lt;/p&gt;

&lt;p&gt;Create a new &lt;code&gt;worker.js&lt;/code&gt;  file in the public folder &lt;b&gt;(public/worker.js)&lt;/b&gt; and add the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Let CACHE_NAME = 'your-app-name';
Let urlsToCache = [
  '/',
  '/completed'
];

// Install a service worker
self.addEventListener('install', event =&amp;gt; {
  // Perform install steps
  event.waitUntil(
    caches.open(CACHE_NAME)
      .then(function(cache) {
        console.log('Opened cache');
        return cache.addAll(urlsToCache);
      })
  );
});

// Cache and return requests
self.addEventListener('fetch', event =&amp;gt; {
  event.respondWith(
    caches.match(event.request)
      .then(function(response) {
        // Cache hit - return response
        if (response) {
          return response;
        }
        return fetch(event.request);
      }
    )
  );
});

// Update a service worker
self.addEventListener('activate', event =&amp;gt; {
  Let cacheWhitelist = ['your-app-name'];
  event.waitUntil(
    caches.keys().then(cacheNames =&amp;gt; {
      return Promise.all(
        cacheNames.map(cacheName =&amp;gt; {
          if (cacheWhitelist.indexOf(cacheName) === -1) {
            return caches.delete(cacheName);
          }
        })
      );
    })
  );
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note! from above code replace (your-app-name) with your app name&lt;/p&gt;

&lt;h1&gt;
  
  
  2. Now Update HTML
&lt;/h1&gt;

&lt;p&gt;Update your &lt;code&gt;index.html&lt;/code&gt; file in the public folder &lt;b&gt;(public/index.html)&lt;/b&gt; &lt;br&gt;
to check if the client’s browser supports service workers. Just Add below code inside the body tag of your app's &lt;b&gt;(public/index.html)&lt;/b&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;script&amp;gt;
      if ('serviceWorker' in navigator) {
        window.addEventListener('load', function() {
          navigator.serviceWorker.register('worker.js').then(function(registration) {
            console.log('Worker registration successful', registration.scope);
          }, function(err) {
            console.log('Worker registration failed', err);
          }).catch(function(err) {
            console.log(err);
          });
        });
      } else {
        console.log('Service Worker is not supported by browser.');
      }
    &amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  3. Activating ServiceWorker
&lt;/h1&gt;

&lt;p&gt;Now go to your app's &lt;code&gt;index.js&lt;/code&gt; in the src folder (src/index.js)&lt;/p&gt;

&lt;p&gt;Now Update &lt;code&gt;serviceWorker.unregister() to serviceWorker.register()&lt;/code&gt;  Like Below Code At Last Line&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';

ReactDOM.render(&amp;lt;App /&amp;gt;, document.getElementById('root'));

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: http://bit.ly/CRA-PWA
serviceWorker.register();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Restart (npm start) and reload your React app — you should see the message “Worker registration successful” in the console.&lt;/p&gt;

&lt;h1&gt;
  
  
  4. Create a manifest.json file
&lt;/h1&gt;

&lt;p&gt;Manifest is a simple JSON file that tells the browser about your web application and how it should behave when 'installed' on the user's mobile device or desktop. Having a manifest is required by Chrome to show the Add to Home Screen prompt.&lt;/p&gt;

&lt;p&gt;A typical manifest file includes information about the app name, icons it should use, the start_url it should start at when launched, and more.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "name": "your-app-name",
    "short_name": "your-app-name",
    "icons": [
        {
            "src": "img/logo.png",
            "sizes": "92x92",
            "type": "image/png"
        },
        {
            "src": "/img/logo.png",
            "sizes": "144x144",
            "type": "image/png"
        },
        {
            "src": "img/logo.png",
            "sizes": "152x152",
            "type": "image/png"
        }        
    ],
    "start_url": "/",
    "display": "standalone",
    "orientation": "portrait",
    "background_color": "#f0f2f5",
    "theme_color": "#96f2d7"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  That's it 🎉 Congratulations, you just created a working progressive web app!
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Give A heart ❤️ To Appreciate My Work And Follow Me For More Awesome Content.
&lt;/h2&gt;

&lt;h1&gt;
  
  
  This Is "irshad ali"
&lt;/h1&gt;

&lt;p&gt;Check Out React PWA Demo: &lt;a href="https://www.irshadali.site" rel="noopener noreferrer"&gt;https://www.irshadali.site&lt;/a&gt;&lt;/p&gt;

</description>
      <category>pwa</category>
      <category>javascript</category>
      <category>react</category>
    </item>
    <item>
      <title>Make One Page Link To All Your Webpages</title>
      <dc:creator>Irshad Ali</dc:creator>
      <pubDate>Sat, 30 Nov 2019 07:39:07 +0000</pubDate>
      <link>https://forem.com/phonerefer/one-page-link-to-all-your-webpages-4b6k</link>
      <guid>https://forem.com/phonerefer/one-page-link-to-all-your-webpages-4b6k</guid>
      <description>&lt;h1&gt;
  
  
  Make your own linktree
&lt;/h1&gt;

&lt;p&gt;Remember when Linktr.ee took the Instagram world by storm back in December of 2016? Everyone was like, "YAS. Now I can link to more than just one thing in my Insta bio!"&lt;/p&gt;

&lt;p&gt;&lt;b&gt;All of that FOR FREE. Sounds great, right?&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Well, believe it or not, there's a couple drawbacks from their free version.&lt;/p&gt;

&lt;p&gt;&lt;b&gt; WHAT YOU SHOULD DO INSTEAD...&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Just use below code and make your own landing page for all your social media platforms. Use it everywhere, link to anywhere! Link to Multiple Webpages.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;b&gt;Replace You Details In Side The Code&lt;/b&gt;
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;lt;head&amp;gt;
  &amp;lt;meta charset="utf-8" /&amp;gt;
  &amp;lt;link rel="shortcut icon" href="https://res.cloudinary.com/phonerefer/image/upload/v1575096088/ve0o2n85nfvgdatgqer2.jpg" /&amp;gt;
  &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1" /&amp;gt;
  &amp;lt;meta name="theme-color" content="#343a40" /&amp;gt;
  &amp;lt;meta
          name="description"
          content="Links To My Accounts | Developed By - Your Name"
  /&amp;gt;  
  &amp;lt;link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous"&amp;gt;
  &amp;lt;link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"&amp;gt;
     &amp;lt;title&amp;gt;Links - Your Name&amp;lt;/title&amp;gt;
     &amp;lt;style&amp;gt;
       body{
         background-color: #faf8ef;
       }
       h5{
             color: #343a40;
       }
       .name{
           color: #343a40;
       }
       .love{
           color: #343a40 !important;
       }
       /*----------------- Mail-------------------- */
       #email{
           text-decoration: none;
           float: right;
           color:#343a40;
       }
       .footer{
           margin-top: 5% !important;
           margin-bottom: 10px;
       }
       @media (max-width: 479px) {
            .footer{
            margin-top: 35% !important;
            }
       }
     &amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;div class="container"&amp;gt;
  &amp;lt;div class="media mt-5"&amp;gt;
    &amp;lt;img src="https://res.cloudinary.com/phonerefer/image/upload/v1575096088/ve0o2n85nfvgdatgqer2.jpg" class="m-3" alt="image" width="75px" height="75px"&amp;gt;
    &amp;lt;div class="media-body m-2"&amp;gt;
      &amp;lt;h5 class="align-items-center mt-2"&amp;gt;Your Name&amp;lt;/h5&amp;gt;
      &amp;lt;p&amp;gt;Hello!
      I am (Your Name)
      Developer based in (Your City), (Your Country).&amp;lt;/p&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;div class="mt-4"&amp;gt;
  &amp;lt;a href="#" class="btn btn-outline-dark btn-block" role="button" target="_blank"&amp;gt;&amp;lt;i class="fa fa-address-card"&amp;gt;&amp;amp;nbsp;&amp;lt;/i&amp;gt;Portfolio&amp;lt;/a&amp;gt;
  &amp;lt;br&amp;gt;
  &amp;lt;a href="#" class="btn btn-outline-dark btn-block" role="button" target="_blank"&amp;gt;&amp;lt;i class="fab fa-github"&amp;gt;&amp;amp;nbsp;&amp;lt;/i&amp;gt;Github&amp;lt;/a&amp;gt;
  &amp;lt;br&amp;gt;
  &amp;lt;a href="#" class="btn btn-outline-dark btn-block" role="button" target="_blank"&amp;gt;&amp;lt;i class="fab fa-codepen"&amp;gt;&amp;amp;nbsp;&amp;lt;/i&amp;gt;Codepen&amp;lt;/a&amp;gt;
  &amp;lt;br&amp;gt;
  &amp;lt;a href="#" class="btn btn-outline-dark btn-block" role="button" target="_blank"&amp;gt;&amp;lt;i class="fab fa-instagram"&amp;gt;&amp;amp;nbsp;&amp;lt;/i&amp;gt;Instagram&amp;lt;/a&amp;gt;
  &amp;lt;br&amp;gt;
  &amp;lt;a href="#" class="btn btn-outline-dark btn-block" role="button" target="_blank"&amp;gt;&amp;lt;i class="fab fa-twitter"&amp;gt;&amp;amp;nbsp;&amp;lt;/i&amp;gt;Twitter&amp;lt;/a&amp;gt;
  &amp;lt;br&amp;gt;
  &amp;lt;a href="#" class="btn btn-outline-dark btn-block" role="button" target="_blank"&amp;gt;&amp;lt;i class="fa fa-code"&amp;gt;&amp;amp;nbsp;&amp;lt;/i&amp;gt;Company Site&amp;lt;/a&amp;gt;
&amp;lt;/div&amp;gt;
        &amp;lt;!--------------------Footer----------------------------&amp;gt;
  &amp;lt;div class="footer mt-5"&amp;gt;
    &amp;lt;hr/&amp;gt;
    &amp;lt;h6&amp;gt;Made With &amp;lt;span class="love"&amp;gt;♥&amp;lt;/span&amp;gt; in (Your City), (Your Country)&amp;lt;/h6&amp;gt;
    &amp;lt;h6&amp;gt;
      Proudly Hosted By
      &amp;lt;a href="/" class="name" target="_blank"&amp;gt; (Your Name) &amp;lt;/a&amp;gt;
      &amp;lt;a id="email" href="mailto:Your Mail"&amp;gt; &amp;lt;i class="fa fa-envelope"&amp;gt; &amp;lt;/i&amp;gt; &amp;lt;/a&amp;gt;
    &amp;lt;/h6&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;

&amp;lt;/body&amp;gt;

&amp;lt;/html&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;b&gt;Get Code through GitHub:&lt;/b&gt; &lt;a href="https://github.com/phonerefer/LinkTree"&gt;https://github.com/phonerefer/LinkTree&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Demo:&lt;/b&gt; &lt;a href="https://mylinks.netlify.com"&gt;https://mylinks.netlify.com&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Change To Do!
&lt;/h2&gt;

&lt;p&gt;&lt;b&gt;Change Photos&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Line No: 5 This is favicon&lt;br&gt;
Line No: 48 This will be your photo&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Social Links&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Line No: 58 to 67 replace # with your desire link&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Names&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Replace (Your Name) with Your Name &lt;br&gt;
Replace (Your City) with Your City&lt;br&gt;
Replace (Your Country) with Your Country Name&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Gmail&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Line No: 74 replace (Your Mail) with your gmail without brackets &lt;/p&gt;

&lt;p&gt;&lt;b&gt;Thanks For Reading....&lt;/b&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>html</category>
      <category>css</category>
    </item>
    <item>
      <title>Convert Any Static Website To PWA</title>
      <dc:creator>Irshad Ali</dc:creator>
      <pubDate>Fri, 29 Nov 2019 11:45:51 +0000</pubDate>
      <link>https://forem.com/phonerefer/convert-any-static-website-to-pwa-3fkb</link>
      <guid>https://forem.com/phonerefer/convert-any-static-website-to-pwa-3fkb</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0ecQmTvf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/phonerefer/image/upload/c_scale%2Ch_50%2Cw_150/v1573154075/irshadali.site/wd0dusiqooqdg81ygqxj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0ecQmTvf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/phonerefer/image/upload/c_scale%2Ch_50%2Cw_150/v1573154075/irshadali.site/wd0dusiqooqdg81ygqxj.png" alt="PWA" title="PWA" width="150" height="50"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  What is PWA?
&lt;/h1&gt;

&lt;p&gt;Progressive Web Apps are user experiences that have the reach of the web, and are:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;b&gt;Reliable&lt;/b&gt; - Load instantly and never show the downasaur, even in uncertain network conditions.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;b&gt;Fast&lt;/b&gt; - Respond quickly to user interactions with silky smooth animations and no janky scrolling.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;b&gt;Engaging&lt;/b&gt; - Feel like a natural app on the device, with an immersive user experience.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This new level of quality allows Progressive Web Apps to earn a place on the user's home screen.&lt;/p&gt;

&lt;h1&gt;
  
  
  1. Create a manifest.json file
&lt;/h1&gt;

&lt;p&gt;Manifest is a simple JSON file that tells the browser about your web application and how it should behave when 'installed' on the user's mobile device or desktop. Having a manifest is required by Chrome to show the Add to Home Screen prompt.&lt;/p&gt;

&lt;p&gt;A typical manifest file includes information about the app name, icons it should use, the start_url it should start at when launched, and more.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "name": "K IRSHAD ALI",
    "short_name": "ALI",
    "icons": [
        {
            "src": "img/logo.png",
            "sizes": "92x92",
            "type": "image/png"
        },
        {
            "src": "/img/logo.png",
            "sizes": "144x144",
            "type": "image/png"
        },
        {
            "src": "img/logo.png",
            "sizes": "152x152",
            "type": "image/png"
        }        
    ],
    "start_url": "/",
    "display": "standalone",
    "orientation": "portrait",
    "background_color": "#f0f2f5",
    "theme_color": "#96f2d7"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And also connect it in your &lt;code&gt;index.html&lt;/code&gt; in order to work.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;link rel="manifest" href="manifest.json"&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  2. Add a Service Worker
&lt;/h1&gt;

&lt;p&gt;Service Worker is the background script which the browser can run while the user is not on the page. It is the element that gives the offline support and gets active when the notification is pushed.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Create a Service Worker (create a file with name SW.js),&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Copy this code in &lt;code&gt;SW.js&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/** An empty service worker! */&lt;br&gt;
self.addEventListener('fetch', function(event) {&lt;br&gt;
});&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;And that’s it.&lt;/p&gt;

&lt;h1&gt;
  
  
  3. Register the Service Worker
&lt;/h1&gt;

&lt;p&gt;You will have to register the code in your website’s code, for that, open up your &lt;code&gt;App.js&lt;/code&gt; file and paste this Now, &lt;/p&gt;

&lt;p&gt;&lt;code&gt;navigator.serviceWorker &amp;amp;&amp;amp; &lt;br&gt;
 navigator.serviceWorker.register('SW.js').then(function (registration)&lt;br&gt;
 {&lt;br&gt;
 });&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;the code will get executed on every single page load. Check if its working properly by reloading the page and then checking – chrome://serviceworker-internals/&lt;/p&gt;

&lt;p&gt;Now your website will be able to prompt users to install it on their home screens and secondly, you will be able to make your site able to support push notifications and even work offline.&lt;/p&gt;

&lt;h1&gt;
  
  
  4. Make the Site Work Offline
&lt;/h1&gt;

&lt;p&gt;First step would be to open sw.js script and get hold of caches object. Once you have that, update the code and app the entire website to cache.&lt;/p&gt;

&lt;p&gt;Try out how it’s working now. Uninstall the present app and load it on Chrome. Next, refresh the page and select ‘Add to Home Screen’ in the right corner menu.&lt;/p&gt;

&lt;p&gt;For abiding by the rule that when Service Worker changes, the page should reload and reinstall it, all you will have to do is add a component which has the ‘version’ of the service worker. When that changes, the install movement happens again, caching the resources that would have changed.&lt;/p&gt;

&lt;p&gt;Congratulations, you now know how to turn the website into Progressive Web App and if you followed the steps side-by-side, you have now even migrated your website into a Progressive Web App!&lt;/p&gt;

&lt;h1&gt;
  
  
  Disclaimer:
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; While these steps will give you, the developer, an exact idea of how you will have to fill in the blanks and move from Point A in the process to Point C, if you are reading this as an enthusiastic entrepreneur who wishes to take charge of the migration, I would say, don’t do it without a person who excels in knowing how to turn website into progressive Web App.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;While these steps are explanatory, there are a number of elements that come up as part of the process when you sit with the actual development process. So, instead of trying your hands with the steps and finding a different result because you weren’t sure of the between the line elements, give the job to the Progressive Web Apps experts who specialize in the domain.&lt;/p&gt;

&lt;h1&gt;
  
  
  Get More Infomation By Google
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://developers.google.com/web/progressive-web-apps"&gt;https://developers.google.com/web/progressive-web-apps&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Hope you like this post
&lt;/h1&gt;

&lt;h2&gt;
  
  
  irshad ali
&lt;/h2&gt;

&lt;p&gt;Visit Me: &lt;a href="https://irshadali.site"&gt;https://irshadali.site&lt;/a&gt;&lt;/p&gt;

</description>
      <category>pwa</category>
      <category>javascript</category>
      <category>html</category>
      <category>css</category>
    </item>
  </channel>
</rss>
