<?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: Linda</title>
    <description>The latest articles on DEV Community by Linda (@lindaojo).</description>
    <link>https://dev.to/lindaojo</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%2F478418%2Fded3eb2a-a8e0-42ad-8c10-997e41d33c90.jpg</url>
      <title>DEV Community: Linda</title>
      <link>https://dev.to/lindaojo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lindaojo"/>
    <language>en</language>
    <item>
      <title>How to test your API with Hoppscotch</title>
      <dc:creator>Linda</dc:creator>
      <pubDate>Wed, 30 Jun 2021 15:31:46 +0000</pubDate>
      <link>https://dev.to/lindaojo/how-to-test-your-api-with-hoppscotch-3hd0</link>
      <guid>https://dev.to/lindaojo/how-to-test-your-api-with-hoppscotch-3hd0</guid>
      <description>&lt;p&gt;&lt;a href="https://aviyel.com/post/206/how-to-test-your-api-with-hoppscotch"&gt;You can read the full article on Aviyel&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this article, I will show you how to interact with APIs by making requests while showing you some of the cool features of &lt;a href="https://hoppscotch.io/"&gt;Hoppscotch&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction to Hoppscotch
&lt;/h2&gt;

&lt;p&gt;Hoppscotch is an online open-source API request builder built by &lt;a href="https://github.com/liyasthomas"&gt;Liyas Thomas&lt;/a&gt; and &lt;a href="https://github.com/hoppscotch/hoppscotch/graphs/contributors"&gt;contributors&lt;/a&gt; that helps you create requests faster, saving precious time on development. It is lightweight, effective, and efficient,&lt;/p&gt;

&lt;p&gt;Hoppscotch is a totally free open-source project.&lt;/p&gt;

&lt;p&gt;Hoppscotch has a low processing demand because it can run simply on the browser.&lt;/p&gt;

&lt;p&gt;Hoppscotch is supported by a wide range of browsers and devices, plus it can be installed as a PWA (Progressive Web App), making it even accessible.&lt;/p&gt;

&lt;p&gt;Hoppscotch offers &lt;a href="https://github.com/hoppscotch/hoppscotch#features"&gt;multiple features&lt;/a&gt; though, in this article, we shall focus on using it as a testing tool for APIs.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is an API?
&lt;/h2&gt;

&lt;p&gt;API is the acronym for Application Programming Interface, a software intermediary that allows two applications to talk to each other. It is often a set of functions that allows applications to access data and interact with external software components, operating systems, or microservices.&lt;/p&gt;

&lt;p&gt;A great analog used to describe APIs and what they do is a restaurant. In this analogy, the following roles are assigned:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;API&lt;/strong&gt;: acts as the waiter that serves you.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Order&lt;/strong&gt;: acts as the API Request, where data to be fetched or action to be triggered is specified.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Chef&lt;/strong&gt;: acts as whatever external component you are trying to interact with, also provides the API.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Meal&lt;/strong&gt;: data gotten from the external Component.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When you step into a restaurant, you inform the waiter (API) of your order (API request), and the waiter communicates your order to the Chef (external component). After a hopefully short period of time, the waiter returns with your meal (Data).&lt;/p&gt;

&lt;p&gt;The same way a chef provides you with a waiter is the same way companies provide you with an API to communicate how you want to use their services &amp;amp; the data you need from them.&lt;/p&gt;

&lt;p&gt;Now that you have a good idea of what APIs are and what they do, let’s dive into the basics of API using &lt;a href="https://hoppscotch.io/"&gt;Hoppscotch&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction to API Basics
&lt;/h2&gt;

&lt;p&gt;You can read the rest of the article on &lt;a href="https://aviyel.com/post/206/how-to-test-your-api-with-hoppscotch"&gt;Aviyel&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>Introduction to HTTP Cookies</title>
      <dc:creator>Linda</dc:creator>
      <pubDate>Sun, 09 May 2021 15:29:12 +0000</pubDate>
      <link>https://dev.to/lindaojo/introduction-to-http-cookies-1pn2</link>
      <guid>https://dev.to/lindaojo/introduction-to-http-cookies-1pn2</guid>
      <description>&lt;p&gt;I heard the british use biscuits instead of cookies...weird.&lt;/p&gt;

&lt;p&gt;Okay, let's focus.&lt;/p&gt;

&lt;h3&gt;What are Cookies&lt;/h3&gt;

&lt;p&gt;Cookies, more properly called HTTP cookies, are small bits of data stored as text files on a browser. Cookies associate bits of data to a specific user.&lt;/p&gt;

&lt;p&gt;Cookies are mainly used for three purposes:&lt;/p&gt;

&lt;h4&gt;Session management&lt;/h4&gt;

&lt;p&gt;Logins, shopping carts, game scores, or anything else the server should remember.&lt;/p&gt;

&lt;h4&gt;Personalization&lt;/h4&gt;

&lt;p&gt;User preferences, themes, and other settings.&lt;/p&gt;

&lt;p&gt;For example, a user's preferences such as language and preferred theme could be saved for future sessions.&lt;/p&gt;

&lt;h4&gt;Tracking&lt;/h4&gt;

&lt;p&gt;Recording and analyzing user behavior.&lt;/p&gt;

&lt;p&gt;When a user visits a shopping website and searches for an item, the item gets saved in their browser history. Cookies can read browsing history so similar are shown to the user next time they visit.&lt;/p&gt;

&lt;h3&gt;Types of Cookies&lt;/h3&gt;

&lt;h4&gt;Session cookies&lt;/h4&gt;

&lt;p&gt;Session cookies, also known as 'temporary cookies', help websites recognise users and the information provided when they navigate through a website. Session cookies only retain information about a user's activities for as long as they are on the website. Once the web browser is closed, the cookies are deleted.&lt;/p&gt;

&lt;h4&gt;Permanent cookies&lt;/h4&gt;

&lt;p&gt;Permanent cookies are also known as 'persistent cookies'. They remain in operation even after the web browser has closed. For example they can remember login details and passwords so web users don't need to re-enter them every time they use a site.&lt;/p&gt;

&lt;h4&gt;Third-party cookies&lt;/h4&gt;

&lt;p&gt;Third-party cookies are installed by third-parties with the aim of collecting certain information from web users to carry out research into, for example, behaviour, demographics or spending habits. They are commonly used by advertisers who want to ensure that products and services are marketed towards the right target audience.&lt;/p&gt;

&lt;h4&gt;Flash cookies&lt;/h4&gt;

&lt;p&gt;Flash cookies are also known as 'super cookies'. They are independent from the web browser. They are designed to be permanently stored on a user's computer. These types of cookies remain on a user's device even after all cookies have been deleted from their web browser.&lt;/p&gt;

&lt;h4&gt;Zombie cookies&lt;/h4&gt;

&lt;p&gt;Zombie cookies are a type of flash cookie that are automatically re-created after a user has deleted them. This means they are difficult to detect or manage. They are often used in online games to prevent users from cheating, but have also been used to install malicious software onto a user's device.&lt;/p&gt;

&lt;h4&gt;Secure Cookies&lt;/h4&gt;

&lt;p&gt;Only HTTPS websites can set secure cookies, i.e., cookies with encrypted data. Mostly, the checkout or payment pages of e-commerce websites have secure cookies to facilitate safer transactions. Similarly, online banking websites are required to use secure cookies for security reasons.&lt;/p&gt;

&lt;h3&gt;Creating Cookies with Vanilla JavaScript&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;NOTE: For the code below to work, your browser has to have local cookies support turned on.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;JavaScript can create, read, and delete cookies with the document.cookie property.&lt;/p&gt;

&lt;p&gt;With JavaScript, a cookie can be created like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;cookie&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;name=Linda Ojo&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;You can also add an expiry date (in UTC time). By default, the cookie is deleted when the browser is closed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;cookie&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;name=Linda Ojo; expires=Wed, 1 Oct 2022 12:00:00 UTC&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;With a path parameter, you can tell the browser what path the cookie belongs to. By default, the cookie belongs to the current page.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;cookie&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;name=Linda Ojo; expires=Wed, 1 Oct 2022 12:00:00 UTC; path=/&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;Handling Cookies using just vanilla JavaScript can get tedious real quick that's why I prefer using the &lt;a href="https://www.npmjs.com/package/js-cookie"&gt;JavaScript Cookie Package&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Handling Cookies with &lt;a href="https://www.npmjs.com/package/js-cookie"&gt;JavaScript Cookie Package&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;JavaScript Cookie is a simple lightweight JavaScript API for handling cookies. It works on all browsers, accepts any character, heavily tested and requires no dependency. Awesome!&lt;/p&gt;

&lt;h4&gt;Installation&lt;/h4&gt;

&lt;p&gt;Run the command below in your root folder to install js-cookies.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;npm&lt;/span&gt; &lt;span class="nx"&gt;install&lt;/span&gt; &lt;span class="nx"&gt;js&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;cookie&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nx"&gt;save&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;Cookie Attributes&lt;/h4&gt;




&lt;li&gt;Expire: define when the cookie will be removed. Value can be a Number which will be interpreted as days from time of creation or a Date instance.&lt;/li&gt;
&lt;br&gt;
&lt;li&gt;Path: a String indicating the path where the cookie is visible. &lt;/li&gt;
&lt;br&gt;
&lt;li&gt;Domain: a String indicating a valid domain where the cookie should be visible. The cookie will also be visible to all subdomains. &lt;/li&gt;
&lt;br&gt;
&lt;li&gt;Secure: Either true or false, indicating if the cookie transmission requires a secure protocol (https).
&lt;/li&gt;

&lt;h4&gt;Create a cookie&lt;/h4&gt;

&lt;p&gt;We can create a cookie that valid across the entire website by providing the name and the value as shown below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-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;Cookies&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;js-cookie&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;Cookies&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;name&lt;/span&gt;&lt;span class="dl"&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;value&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;We can specify how long it takes for a cookie to expire by passing an object that contains the number of days before expiration as the third argument in the &lt;code&gt;Cookie.set&lt;/code&gt; method. The cookie that's created below expires after 7 days. By default, a cookie is removed when the user closes the browser.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-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;Cookies&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;js-cookie&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;Cookies&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;name&lt;/span&gt;&lt;span class="dl"&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;value&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;expires&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next,We can create an secure expiring cookie that's only valid to the path of the current page. The path is add to the previous Object which contains the expiration date.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;Cookies&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;name&lt;/span&gt;&lt;span class="dl"&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;value&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;expires&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;secure&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;Read cookie&lt;/h4&gt;

&lt;p&gt;The point of creating cookies is so we can use them later. We can access already existing cookies using the &lt;code&gt;Cookie.get&lt;/code&gt; method. Let's create and read a real cookie called 'theme'.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-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;Cookies&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;js-cookie&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;Cookies&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;theme&lt;/span&gt;&lt;span class="dl"&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;dark&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;Cookies&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;theme&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// =&amp;gt; 'dark'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also update a cookie by overriding it's value&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;Cookies&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;theme&lt;/span&gt;&lt;span class="dl"&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;light&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 the theme cookie has a value of 'light'.&lt;/p&gt;

&lt;p&gt;We can get all cookies present at once by calling &lt;code&gt;Cookies.get&lt;/code&gt; method without passing in any arguments as shown below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;
&lt;span class="nx"&gt;Cookies&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;get&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// =&amp;gt; { theme: 'light' }&lt;/span&gt;

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

&lt;/div&gt;



&lt;h4&gt;Delete cookie&lt;/h4&gt;

&lt;p&gt;You can delete cookies that are globally accessible running the &lt;code&gt;Cookie.remove&lt;/code&gt; method with just the first argument which is &lt;code&gt;value&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;Cookies&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;remove&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;theme&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;&lt;strong&gt;Note:&lt;/strong&gt;cwhen deleting a cookie and you're not relying on the default attributes, you must pass the exact same path and domain attributes that were used to set the cookie.&lt;br&gt;
let's set and delete a cookie valid to the path of the current page as an example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;Cookies&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;direction&lt;/span&gt;&lt;span class="dl"&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;north&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&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;Cookies&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;remove&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;direction&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// fail!&lt;/span&gt;
&lt;span class="nx"&gt;Cookies&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;remove&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;direction&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt; &lt;span class="c1"&gt;// removed!&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's all folks. &lt;a href="https://lindaojo.com/articles"&gt;Read more of my articles&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Beginner's Introduction to Axios</title>
      <dc:creator>Linda</dc:creator>
      <pubDate>Mon, 29 Mar 2021 20:27:13 +0000</pubDate>
      <link>https://dev.to/lindaojo/beginner-s-introduction-to-axios-hie</link>
      <guid>https://dev.to/lindaojo/beginner-s-introduction-to-axios-hie</guid>
      <description>&lt;p&gt;Making HTTP requests to fetch/save data is a common task for any client-side JavaScript application. Axios is a JavaScript library that's used to perform HTTP requests. It works in both Browser and Node.js platforms.&lt;/p&gt;

&lt;p&gt;It supports all modern browsers, including support for IE8 and higher.&lt;/p&gt;

&lt;h3&gt;Adding Axios to your project&lt;/h3&gt;

&lt;p&gt;You can add Axios to your project using any of the methods listed below.&lt;/p&gt;

&lt;p&gt;Using npm:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;axios
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using bower:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;bower &lt;span class="nb"&gt;install &lt;/span&gt;axios
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using yarn:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;yarn add axios
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using jsDelivr CDN:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using unpkg CDN:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://unpkg.com/axios/dist/axios.min.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;Making a "GET" request&lt;/h3&gt;

&lt;p&gt;Let's query the &lt;a href="https://dummyapi.io/explorer" class="link"&gt;DummyAPI&lt;/a&gt; to retrieve a list of users, using &lt;code&gt;axios.get()&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-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;axios&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;axios&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;get&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://dummyapi.io/data/api/user?limit=10&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;users&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since Axios always returns the query in an object data, we can rewrite the code above as using &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment" class="link"&gt;destructuring&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-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;axios&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;axios&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;get&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://dummyapi.io/data/api/user?limit=10&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;users&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

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

&lt;/div&gt;



&lt;h3&gt;Making a "POST" request&lt;/h3&gt;

&lt;p&gt;A POST request is used to add new data on the Backend. A POST request is similar to a GET request, but instead of &lt;code&gt;axios.get&lt;/code&gt;, you use &lt;code&gt;axios.post&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;A POST Request also accepts a second argument which is an Object containing the data that is to be added.&lt;/p&gt;

&lt;p&gt;Let's add a new user below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-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;axios&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;axios&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;newUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;John&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;john@gmail.com&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
    &lt;span class="na"&gt;Gender&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Male&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;addUser&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&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="nx"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;post&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://dummyapi.io/data/api/user/&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;addUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;newUser&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a quick introduction for beginners. Axios enables you to do so much more. You can read about more advanced Axios methods in this &lt;a href="https://blog.logrocket.com/how-to-make-http-requests-like-a-pro-with-axios/#postjson"&gt;Article by Faraz Kelhini&lt;/a&gt; &lt;/p&gt;

</description>
      <category>beginners</category>
      <category>javascript</category>
      <category>axios</category>
      <category>programming</category>
    </item>
    <item>
      <title>How to use Media Queries in HTML, CSS and JavaScript</title>
      <dc:creator>Linda</dc:creator>
      <pubDate>Mon, 22 Mar 2021 21:08:20 +0000</pubDate>
      <link>https://dev.to/lindaojo/how-to-use-media-queries-in-html-css-and-javascript-n8o</link>
      <guid>https://dev.to/lindaojo/how-to-use-media-queries-in-html-css-and-javascript-n8o</guid>
      <description>&lt;p&gt;This was originally posted at &lt;a href="https://www.lindaojo.com/blog/how-to-use-media-queries-in-html-css-and-java-script/"&gt;lindaojo.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Media queries can be used to check many things, such as:&lt;/p&gt;

&lt;ol&gt;
    &lt;li&gt;width and height of the viewport&lt;/li&gt;
    &lt;li&gt;width and height of the device&lt;/li&gt;
    &lt;li&gt;orientation (is the tablet/phone in landscape or portrait mode?)
    resolution&lt;/li&gt;
    &lt;li&gt;Using media queries are a popular technique for delivering a tailored style sheet (responsive web design) to desktops, laptops, tablets, and mobile phones.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Media queries are commonly associated with CSS, but they can be used in HTML and JavaScript as well.&lt;/p&gt;

&lt;h3&gt;Media Queries in HTML&lt;/h3&gt;

&lt;p&gt;We can use media queries to determine what &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt; to use in the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; of an HTML file as shown below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"all.css"&lt;/span&gt; &lt;span class="na"&gt;media=&lt;/span&gt;&lt;span class="s"&gt;"all"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="c"&gt;&amp;lt;!-- Use for screens that have a width of at least 50rem --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"small.css"&lt;/span&gt; &lt;span class="na"&gt;media=&lt;/span&gt;&lt;span class="s"&gt;"(min-width: 50rem)"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="c"&gt;&amp;lt;!-- Use for screens that have a width of at least 80rem --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"medium.css"&lt;/span&gt; &lt;span class="na"&gt;media=&lt;/span&gt;&lt;span class="s"&gt;"(min-width: 80rem)"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;We can use media queries on the &lt;code&gt;&amp;lt;style&amp;gt;&lt;/code&gt; element too.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;style &lt;/span&gt;&lt;span class="na"&gt;media=&lt;/span&gt;&lt;span class="s"&gt;"all and (min-width: 800px)"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;green&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Media queries can also be placed within the &lt;code&gt;&amp;lt;picture&amp;gt;&lt;/code&gt; element. How? By specifying them on the &lt;code&gt;&amp;lt;source&amp;gt;&lt;/code&gt; element which lets us pass multiply image options.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;picture&amp;gt;&lt;/span&gt;
  &lt;span class="c"&gt;&amp;lt;!-- Use image in landscape mode --&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;source&lt;/span&gt; &lt;span class="na"&gt;srcset=&lt;/span&gt;&lt;span class="s"&gt;"alligator.png"&lt;/span&gt; &lt;span class="na"&gt;media=&lt;/span&gt;&lt;span class="s"&gt;"(orientation: landscape)"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="c"&gt;&amp;lt;!-- Use image in portrait mode --&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;source&lt;/span&gt; &lt;span class="na"&gt;srcset=&lt;/span&gt;&lt;span class="s"&gt;"girrafe.png"&lt;/span&gt; &lt;span class="na"&gt;media=&lt;/span&gt;&lt;span class="s"&gt;"(orientation: portrait)"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/picture&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;Media Queries in CSS&lt;/h3&gt;

&lt;p&gt;This is the most common environment for writing media queries.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;@media&lt;/code&gt; rule is used in media queries to apply different styles for different media types/devices.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="n"&gt;only&lt;/span&gt; &lt;span class="n"&gt;screen&lt;/span&gt; &lt;span class="n"&gt;and&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;min-device-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;500px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;and&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max-device-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;8000px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nc"&gt;.container&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;hidden&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;h3&gt;Media Queries in JavaScript&lt;/h3&gt;

&lt;p&gt;You can add media queries to your JavaScript by using the  &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia"&gt;window.matchMedia()&lt;/a&gt; method.&lt;/p&gt;

&lt;p&gt;For instance, if we want to change the background color of the &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; to &lt;code&gt;red&lt;/code&gt; when the screen width exceeds 600px, we can do that by first creating a constant using "window.matchMedia()" as shown below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Create a media condition that targets viewports at least 768px wide&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;mediaQueryCondition&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;matchMedia&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;( min-width: 600px )&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;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nx"&gt;mediaQueryCondition&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;matches&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;cssText&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`
        background-color: red;
    `&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it folks! You can now add media queries anywhere you want in the whole wild world.&lt;/p&gt;

&lt;p&gt;See you next week!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>html</category>
      <category>css</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Tips on Preparing a Great Developer Resume</title>
      <dc:creator>Linda</dc:creator>
      <pubDate>Tue, 16 Mar 2021 10:08:06 +0000</pubDate>
      <link>https://dev.to/lindaojo/tips-on-preparing-a-great-developer-resume-ag8</link>
      <guid>https://dev.to/lindaojo/tips-on-preparing-a-great-developer-resume-ag8</guid>
      <description>&lt;p&gt;If you are just starting out on your job search and have been wondering about how to prepare a great resume, then you will love these tips! Remember, the goal of your resume is to sell yourself enough to get a meeting with a recruiter.&lt;/p&gt;

&lt;h3&gt;Tailor your resume to the role&lt;/h3&gt;

&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%2Flindaojo%2Fimage%2Fupload%2Fv1615839972%2Fcustomise_k8qzvv.jpg" 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%2Flindaojo%2Fimage%2Fupload%2Fv1615839972%2Fcustomise_k8qzvv.jpg" alt="'Chef adding toppings to Pasta'"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Research the role you are applying for and focus all your points around the criteria listed.&lt;/p&gt;

&lt;p&gt;Different companies have different needs. Tailoring your resume to reflect that you meet the required needs not only improves your chance of getting a callback but also shows you have a genuine interest in working at that company.&lt;/p&gt;

&lt;p&gt;You should use the job description as a guide by mirroring keywords and requirements in your resume.&lt;/p&gt;

&lt;p&gt;For instance, if the major tool for the available role is mentioned, you should reference projects built with that tool.&lt;/p&gt;

&lt;h3&gt;Optimise for readability&lt;/h3&gt;

&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%2Flindaojo%2Fimage%2Fupload%2Fv1615839910%2Freadable_cgqtzo.jpg" 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%2Flindaojo%2Fimage%2Fupload%2Fv1615839910%2Freadable_cgqtzo.jpg" alt="'Blurry text with glasses'"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On average, most single-page resumes would be scanned through within a minute. It's important to ensure that one can read through your resume within a minute with ease and leave with a good understanding of who you are.&lt;/p&gt;

&lt;p&gt;A great way to improve readability is by having a simple layout that lets you communicate effectively.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.canva.com" rel="noopener noreferrer"&gt;Canva&lt;/a&gt; has great templates which you can use to create beautiful resumes.&lt;/p&gt;

&lt;h3&gt;Relevant things first, Relevant things only&lt;/h3&gt;

&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%2Flindaojo%2Fimage%2Fupload%2Fv1615840193%2Frelevance_kefotj.jpg" 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%2Flindaojo%2Fimage%2Fupload%2Fv1615840193%2Frelevance_kefotj.jpg" alt="'Relevance'"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You have the task of making a good impression within a short period of time. Every point should signal to the recruiter that you are a good fit for the team.&lt;/p&gt;

&lt;p&gt;You should only write things on your resume that would improve your chances by sharing useful information with the recruiter. You should not write skills on your resume that are not relevant to the present role you are applying to.&lt;/p&gt;

&lt;p&gt;You can have multiple resumes that contain different sets of skills if you are applying to different roles at once. For instance, you should not use the same resume to apply for a Technical Writer and Frontend Developer role.&lt;/p&gt;

&lt;h3&gt;Use numbers and results&lt;/h3&gt;

&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%2Flindaojo%2Fimage%2Fupload%2Fv1615839907%2Fresults_llmfpk.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%2Flindaojo%2Fimage%2Fupload%2Fv1615839907%2Fresults_llmfpk.png" alt="'Charts'"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Using numbers and outlining the impact you had in past roles does a better job at communicating your relevance to a team instead of listing vague responsibilities.&lt;/p&gt;

&lt;p&gt;For instance, instead of saying:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;" Built complex software features, while working directly with the product owner."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You should state a major feature you built and the effect it had on the company profits or user experience e.t.c.&lt;/p&gt;

&lt;p&gt;E.g&lt;br&gt;
&lt;strong&gt;"Implemented a new payment feature with a team of UI designers and product managers which lead to a 11% increase in monthly revenue."&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;Don't Quantify your skills&lt;/h3&gt;

&lt;p&gt;Simply list the skills that you possess and let the recruiter be the judge of your proficiency. Don't cut yourself short by quantifying for skills e.g&lt;/p&gt;

&lt;p&gt;❌ JavaScript - 60%&lt;/p&gt;

&lt;p&gt;❌ HTML - 70%&lt;/p&gt;

&lt;p&gt;❌ Angular - 60%&lt;/p&gt;

&lt;p&gt;❌ React - 70%&lt;/p&gt;

&lt;p&gt;Please don't do this 👆🏾. Not only does it reduce readability it could also reduce your chances.&lt;/p&gt;

&lt;h3&gt;Be honest&lt;/h3&gt;

&lt;p&gt;You should never lie on your resume. If you are going to get that role, you want to get it the right way.&lt;/p&gt;

&lt;p&gt;You shouldn't lie about your years of experience, skills, or interests. Honesty saves everyone's time. &lt;/p&gt;

&lt;h3&gt;Be confident&lt;/h3&gt;

&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%2Flindaojo%2Fimage%2Fupload%2Fv1615840345%2Fconfidence_tzkktx.jpg" 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%2Flindaojo%2Fimage%2Fupload%2Fv1615840345%2Fconfidence_tzkktx.jpg" alt="'Confidence'"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Be confident in your skills no matter what level you are on. The presence or absence of confidence can be sensed through your resume. You have to believe in yourself&lt;/p&gt;

&lt;h3&gt;Pay attention to details&lt;/h3&gt;

&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%2Flindaojo%2Fimage%2Fupload%2Fv1615840459%2Fdetails_znej9l.jpg" 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%2Flindaojo%2Fimage%2Fupload%2Fv1615840459%2Fdetails_znej9l.jpg" alt="'Attention to Details'"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Make sure to proofread your resume and also bring on a second set of eyes.&lt;br&gt;
Having multiple grammatical errors in your resume does not speak well of you and could indicate that you don't pay attention to details.&lt;/p&gt;

&lt;p&gt;You would be required to communicate effectively in any job role. Having good writing skills is always a plus.&lt;/p&gt;

&lt;h3&gt;Always save your resume as a PDF file&lt;/h3&gt;

&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%2Flindaojo%2Fimage%2Fupload%2Fv1615839907%2Fpdf_ebif6u.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%2Flindaojo%2Fimage%2Fupload%2Fv1615839907%2Fpdf_ebif6u.png" alt="'PDF'"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Can you imagine doing all this work and it shows up all scrambled up on the recruiter's screen? To avoid this, always have your resume with the pdf format. That way you can be sure the recruiter would be viewing your resume exactly how you designed it.&lt;/p&gt;

&lt;p&gt;That's all folks, If this was helpful, share it!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>career</category>
      <category>siliconvalley</category>
      <category>programming</category>
    </item>
    <item>
      <title>4 Handy tools for Frontend Developers</title>
      <dc:creator>Linda</dc:creator>
      <pubDate>Mon, 08 Mar 2021 15:38:57 +0000</pubDate>
      <link>https://dev.to/lindaojo/4-handy-tools-for-frontend-developers-3dao</link>
      <guid>https://dev.to/lindaojo/4-handy-tools-for-frontend-developers-3dao</guid>
      <description>&lt;p&gt;Front-end developers link together the world of design and technology, packaging up the utility of the back end in an inviting way for users to interact with. Doing this requires different skills and to be honest it can get difficult real quick.&lt;/p&gt;

&lt;p&gt;Today, I share 4 useful tools and websites that make my work a lot easier on some days.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cssgrid-generator.netlify.app/" rel="noopener noreferrer"&gt;&lt;h3&gt;Grid Generator by Sarah Drasner&lt;/h3&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;CSS Grid Layout is a layout system available in CSS. It is a 2-dimensional system, that handles both columns and rows. grid systems can get complicated especially when dealing with multiple boxes of different sizes.&lt;/p&gt;

&lt;p&gt;CSS Grid Generator is a great handy tool cause it lets you set up a Grid system for even complex layouts with ease.&lt;/p&gt;

&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%2Flindaojo%2Fimage%2Fupload%2Fv1615209504%2Fcss-grid-generator_bgerxc.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%2Flindaojo%2Fimage%2Fupload%2Fv1615209504%2Fcss-grid-generator_bgerxc.png" alt="CSS Grid Generator by Sarah Drasner"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Automatically generate the code for different Grid styles with ease. Thank you &lt;a href="https://twitter.com/sarah_edo" rel="noopener noreferrer"&gt;Sarah!&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://animate.style" rel="noopener noreferrer"&gt;&lt;h3&gt;Animate.css&lt;/h3&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Animate.css is a small and easy-to-use CSS animation library. It contains ready-to-use, cross-browser animations for use in your web projects. Animate.css can be installed as a package or a CDN. You could also copy the styles of a specific animate from the website and use them directly in your project.&lt;/p&gt;

&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%2Flindaojo%2Fimage%2Fupload%2Fv1615209503%2Fanimate-css_fqwk4f.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%2Flindaojo%2Fimage%2Fupload%2Fv1615209503%2Fanimate-css_fqwk4f.png" alt="Animate CSS"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://greensock.com/gsap/" rel="noopener noreferrer"&gt;&lt;h3&gt;GreenSock Animations Platform (GSAP)&lt;/h3&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to have more control of your animations, you can definitely consider GSAP. It can animate DOM elements, CSS, SVG, CSS, canvas and so much more.&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/GreenSock/embed/wvwEOZL?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://edidiongasikpo.com" rel="noopener noreferrer"&gt;Edidiong Asikpo&lt;/a&gt; wrote a great article on &lt;a href="https://edidiongasikpo.com/using-gsap-scrolltrigger-plugin-in-react" rel="noopener noreferrer"&gt;How to use the GSAP ScrollTrigger plugin in React&lt;/a&gt;. Get a close look at a practical use of GSAP for your next project.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://squoosh.app" rel="noopener noreferrer"&gt;&lt;h3&gt;Squoosh&lt;/h3&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Compressing a website’s image files is one of the quickest and easiest ways to make that site load faster for users.&lt;br&gt;
Squoosh is my "go to" when compressing and converting images. It also has a CLI that allows you to compress many images at once.&lt;/p&gt;

&lt;p&gt;You can read more about improving a website's performance,  &lt;a href="https://www.lindaojo.com/blog/how-to-improve-lighthouse-score-performance/" rel="noopener noreferrer"&gt;How to Improve Lighthouse Score - Performance&lt;/a&gt;&lt;/p&gt;

&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%2Flindaojo%2Fimage%2Fupload%2Fv1615209503%2Fsquoosh_zblvdf.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%2Flindaojo%2Fimage%2Fupload%2Fv1615209503%2Fsquoosh_zblvdf.png" alt="Squoosh"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's all folks, Feel free to let me know what your favourite frontend handy tools are. See you next week!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://lindaojo.com/articles" rel="noopener noreferrer"&gt;Read more of my articles&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>tools</category>
    </item>
    <item>
      <title>Detailed Explanation of CSS Position Property</title>
      <dc:creator>Linda</dc:creator>
      <pubDate>Mon, 01 Mar 2021 13:11:54 +0000</pubDate>
      <link>https://dev.to/lindaojo/detailed-explanation-of-css-position-property-1c8c</link>
      <guid>https://dev.to/lindaojo/detailed-explanation-of-css-position-property-1c8c</guid>
      <description>&lt;p&gt;There are two important types of properties you need to know about when positioning elements on a screen. The first one, position:, specifies the type of positioning method to be used for an element (i.e. static, relative, absolute or fixed). &lt;/p&gt;

&lt;p&gt;The second is a set of properties (top:, bottom:, right:, left:), used to specify the offset for the element. Top, bottom, right &amp;amp; left are calculated differently based on the positioning method used, and are ignored for position: static.&lt;/p&gt;

&lt;p&gt;The position property in CSS defines how an element will be positioned on a page. The top, right, bottom, and left properties determine the final location of positioned elements.&lt;/p&gt;

&lt;h3&gt;Static Positioning&lt;/h3&gt;

&lt;p&gt;A static positioned element is always positioned according to the normal flow of the page. HTML elements are positioned static by default. Static positioned elements are not affected by the top, bottom, left, right, and z-index properties. In the example below, the green box "B" has a static position.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;

&lt;span class="nc"&gt;.static&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;static&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="c"&gt;/* This is often not needed since HTML elements have a static position by default */&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


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

&lt;/div&gt;

&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%2Flindaojo%2Fimage%2Fupload%2Fv1614593087%2FStatic_dja3yr.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%2Flindaojo%2Fimage%2Fupload%2Fv1614593087%2FStatic_dja3yr.png" alt="Static positioning"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Relative Positioning&lt;/h3&gt;

&lt;p&gt;This acts similar to static positioning except that you can position it relative to itself using top, right, bottom, left.&lt;/p&gt;

&lt;p&gt;Relative positioning tells the element to move relative to where it would have landed if it just had the default static positioning. If you give an element relative positioning and tell it to have a top of 40px, it moves down 40px from where it otherwise would have been.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;

&lt;span class="nc"&gt;.relative&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;relative&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;40px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;30px&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;The CSS above changes the position of Box-B as shown below.&lt;/p&gt;

&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%2Flindaojo%2Fimage%2Fupload%2Fv1614593099%2FRelative_pr9pui.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%2Flindaojo%2Fimage%2Fupload%2Fv1614593099%2FRelative_pr9pui.png" alt="Relative positioning"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Absolute Positioning&lt;/h3&gt;

&lt;p&gt;Absolute positioning tells the browser that the element being positioned should be removed from the normal flow of the document and will be placed in an exact location on the page based on the values specified in top, bottom, left &amp;amp; right. it won't affect how the elements before it or after it in the HTML are positioned on the Web page.&lt;/p&gt;

&lt;p&gt;Absolute elements will by default head to the top-left of their closest parent that has a non-static position.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;

&lt;span class="nc"&gt;.absolute&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;absolute&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;right&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0px&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;&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%2Flindaojo%2Fimage%2Fupload%2Fv1614593107%2FAbsolute_w2v3cc.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%2Flindaojo%2Fimage%2Fupload%2Fv1614593107%2FAbsolute_w2v3cc.png" alt="Absolute positioning"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Fixed Positioning&lt;/h3&gt;

&lt;p&gt;Fixed elements are positioned relative to the entire HTML element.&lt;/p&gt;

&lt;p&gt;Fixed positioning is similar to absolute positioning, but, fixed positioning anchors an element to the browser window. If you scroll up and down, the fixed element stays put even as other elements scroll past.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;

&lt;span class="nc"&gt;.fixed&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;fixed&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;right&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;30px&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;&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%2Flindaojo%2Fimage%2Fupload%2Fv1614593119%2FFixed_sslddt.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%2Flindaojo%2Fimage%2Fupload%2Fv1614593119%2FFixed_sslddt.png" alt="Fixed positioning"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Sticky Positioning&lt;/h3&gt;

&lt;p&gt;Sticky position is a combination of both Relative and Fixed position into one. it starts out as relative but once it scrolls out of the page it becomes fixed position.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Internet Explorer, Edge 15 and earlier versions do not support sticky positioning. Safari requires a -webkit- prefix (see example below). You must also specify at least one of top, right, bottom or left for sticky positioning to work.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;

&lt;span class="nc"&gt;.sticky&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;sticky&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;-webkit-sticky&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;right&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;30px&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 is a codepen that includes the other positions including Sticky. Scroll down to see the Sticky position in action.&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/LindaOjo/embed/gOLeqaY?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;That's all folks, See you next week!&lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Introduction to Vue Watchers</title>
      <dc:creator>Linda</dc:creator>
      <pubDate>Mon, 22 Feb 2021 13:36:47 +0000</pubDate>
      <link>https://dev.to/lindaojo/introduction-to-vue-watchers-2jhc</link>
      <guid>https://dev.to/lindaojo/introduction-to-vue-watchers-2jhc</guid>
      <description>&lt;p&gt;In this article, we will be discussing watchers, one of the core concepts in Vue.js.&lt;/p&gt;

&lt;p&gt;Watchers, just as the name implies are used to watch out for changes in a property previously defined in the data object. It is triggered whenever the value of that property changes.&lt;/p&gt;

&lt;p&gt;Let's create a watcher for an "answer" property below. The watcher must have the same name as the property being observed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;data&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="na"&gt;answer&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;watch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;answer&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&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;answer&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;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Watcher above will log the "answer" property to the console anytime its value changes.&lt;/p&gt;

&lt;p&gt;We can also access the old property value and new property value in a Watcher by adding two optional parameters as shown below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;data&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="na"&gt;answer&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;watch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;answer&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;oldAnswer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;newAnswer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`The answer has been changed from &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;oldAnswer&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; to &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;newAnswer&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&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;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If we want to monitor the changes of items within an array or the properties of an object we use "deep". Let's watch out for changes in the "person" Object below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;data&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="na"&gt;person&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Linda&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;gender&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Female&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;signedIn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&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;span class="na"&gt;watch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;person&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;deep&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="c1"&gt;// Vue now watches for changes within the person Object&lt;/span&gt;
      &lt;span class="nx"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;if&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;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isSignedIn&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;records&lt;/span&gt;&lt;span class="o"&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;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As a practical example, I have created a simple "App" where we use a Watcher to monitor the number of times a user has signed.&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/LindaOjo/embed/qBqPZYm?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;That's all folks, See you next week!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>vue</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to Set Up Pagination in Gridsome</title>
      <dc:creator>Linda</dc:creator>
      <pubDate>Mon, 15 Feb 2021 22:06:28 +0000</pubDate>
      <link>https://dev.to/lindaojo/how-to-set-up-pagination-in-gridsome-1546</link>
      <guid>https://dev.to/lindaojo/how-to-set-up-pagination-in-gridsome-1546</guid>
      <description>&lt;h3&gt;What is Gridsome&lt;/h3&gt;

&lt;p&gt;Gridsome is a modern website development framework for creating fast and secure websites that can be deployed anywhere. Static HTML files are generated to create SEO-friendly markup that hydrates into a Vue.js-powered SPA once loaded in the browser. Gridsome has also made it easier than ever before to set up pagination 😄&lt;/p&gt;

&lt;h3&gt;Steps to set up Gridsome Pagination&lt;/h3&gt;

&lt;p&gt;I am assuming that you already have a Gridsome blog that fetches blog posts and you are adding pagination as a new feature. In that case, these are the steps to follow.&lt;/p&gt;

&lt;p&gt; - Setup Pagination in GraphQL query&lt;/p&gt;

&lt;p&gt; - Import Gridsome's Pager component&lt;/p&gt;

&lt;p&gt; - Add necessary styling&lt;/p&gt;

&lt;h3&gt;Setup Pagination in GraphQL query&lt;/h3&gt;

&lt;p&gt;Data collection is handled by the GraphQL query in Gridsome. We can use the &lt;strong&gt;@paginate&lt;/strong&gt; directive in the GraphQL query to add automatic pagination for a collection.&lt;/p&gt;

&lt;p&gt;The query will receive a &lt;strong&gt;$page: Int &lt;/strong&gt;variable you can use to load sources for a specific page.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;query&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;$page&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;allBlogPost&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;perPage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;$page&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;paginate&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;pageInfo&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;totalPages&lt;/span&gt;
      &lt;span class="nx"&gt;currentPage&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nx"&gt;edges&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;node&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;id&lt;/span&gt;
        &lt;span class="nx"&gt;title&lt;/span&gt;
        &lt;span class="nx"&gt;path&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;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the example above, each page will contain 10 blog posts.&lt;/p&gt;

&lt;h3&gt;Import Gridsome's Pager component&lt;/h3&gt;

&lt;p&gt;Gridsome has a built-in &lt;strong&gt;Pager&lt;/strong&gt; component which can be imported for easy pagination. Import and add the Pager component from Gridsome.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-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;Pager&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;gridsome&lt;/span&gt;&lt;span class="dl"&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="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;components&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;Pager&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;Though the Pager component can accept multiple properties, the only required properties are &lt;strong&gt;"total number of Pages"&lt;/strong&gt; and &lt;strong&gt;"current Page"&lt;/strong&gt;. These properties can be found in &lt;strong&gt;"pageInfo"&lt;/strong&gt; which we pass into the Pager component.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;Pager&lt;/span&gt; &lt;span class="na"&gt;:info=&lt;/span&gt;&lt;span class="s"&gt;"$page.allBlogPost.pageInfo"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;Add Custom Styles&lt;/h3&gt;

&lt;p&gt;We can style the pagination container using normal CSS classes but need to use the &lt;strong&gt;:linkClass&lt;/strong&gt; property to style the links.&lt;/p&gt;

&lt;p&gt;Template&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;Pager&lt;/span&gt; &lt;span class="na"&gt;:info=&lt;/span&gt;&lt;span class="s"&gt;"$page.allBlogPost.pageInfo"&lt;/span&gt;
       &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"pager-container"&lt;/span&gt;
       &lt;span class="na"&gt;linkClass=&lt;/span&gt;&lt;span class="s"&gt;"pager-container__link"&lt;/span&gt;  &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Styles&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt; &lt;span class="nt"&gt;scoped&lt;/span&gt; &lt;span class="nt"&gt;lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;"scss"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nc"&gt;.pager-container&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;inline-block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1.5rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;text-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="err"&gt;&amp;amp;__link&lt;/span&gt; &lt;span class="err"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;text-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0.6rem&lt;/span&gt; &lt;span class="m"&gt;1.2rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;text-decoration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="err"&gt;}&lt;/span&gt;

  &lt;span class="nc"&gt;.active&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="nb"&gt;rgb&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;44&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;201&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;180&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's all folk. I have been writing consistently for 4 months 🎉😄&lt;/p&gt;

&lt;p&gt;You might also enjoy my article on &lt;a href="https://www.lindaojo.com/blog/add-code-snippets-using-gridsome-prism-js-plugin/"&gt;How to add Code snippets to Gridsome&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://lindaojo.com/articles"&gt;Read more of my articles&lt;/a&gt;&lt;/p&gt;

</description>
      <category>vue</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Conditional Rendering in Vue</title>
      <dc:creator>Linda</dc:creator>
      <pubDate>Mon, 08 Feb 2021 22:06:45 +0000</pubDate>
      <link>https://dev.to/lindaojo/conditional-rendering-in-vue-4j06</link>
      <guid>https://dev.to/lindaojo/conditional-rendering-in-vue-4j06</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oigLhM4b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/f75ig8u57fbpeettnlet.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oigLhM4b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/f75ig8u57fbpeettnlet.jpeg" alt="Vue Logo with text Conditional rendering"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Conditional rendering is a term to describe the ability to render different user interface (UI) markup depending on if a condition is true or false.&lt;/p&gt;

&lt;p&gt;Conditional Rendering can be implemented in Vue using the directives below&lt;/p&gt;

&lt;p class="list-item"&gt; 💚 v-if&lt;/p&gt;

&lt;p class="list-item"&gt; 💚 v-else&lt;/p&gt;

&lt;p class="list-item"&gt; 💚 v-else-if&lt;/p&gt;

&lt;p class="list-item"&gt; 💚 v-show&lt;/p&gt;

&lt;h3&gt;v-if&lt;/h3&gt;

&lt;p&gt;The "v-if" directive can used to conditionally render an element including other elements that may be within it. The block will only be rendered if the directive’s expression returns a &lt;a class="link" href="https://developer.mozilla.org/en-US/docs/Glossary/Truthy"&gt;truthy value&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;h1&lt;/span&gt; &lt;span class="na"&gt;v-if=&lt;/span&gt;&lt;span class="s"&gt;"showGreeting"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Welcome Home!&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because "v-if" is a directive, it has to be attached to a single element. But what if we want to toggle more than one element?&lt;/p&gt;

&lt;p&gt;You can also add conditional rendering to a group of elements by wrapping them in a "" element as shown below&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;template&lt;/span&gt; &lt;span class="na"&gt;v-if=&lt;/span&gt;&lt;span class="s"&gt;"Chores"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; 🙃
    &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Chores&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;ul&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Wash the cat&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;l1&amp;gt;&lt;/span&gt;Do the dishes&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;ul&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/template&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;"" element serves as an invisible wrapper and will not be displayed in the final rendered result.&lt;/p&gt;

&lt;h3&gt;v-else&lt;/h3&gt;

&lt;p&gt;The "v-else" directive can only be used immediately after the "v-if" directive. They follow the pattern of a typical if-else statement.&lt;/p&gt;

&lt;p&gt;The content within the "v-else" element will be rendered if the condition set in the "v-if" element is not met.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;template&lt;/span&gt; &lt;span class="na"&gt;v-if=&lt;/span&gt;&lt;span class="s"&gt;"Chores"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; 🙃
    &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Chores&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;ul&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Wash the cat&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;l1&amp;gt;&lt;/span&gt;Do the dishes&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;ul&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/template&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;h1&lt;/span&gt; &lt;span class="na"&gt;v-else&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; Watch television&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt; 😀
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;v-else-if&lt;/h3&gt;

&lt;p&gt;The "v-else" element gives you only one other option to render if "v-if" element's condition is not met.&lt;/p&gt;

&lt;p&gt;"v-else-if" serves as an else-if block for "v-if". It can also be chained multiple times so it enable you to have more than one option to render.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;template&lt;/span&gt; &lt;span class="na"&gt;v-if=&lt;/span&gt;&lt;span class="s"&gt;"Chores"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; 🙃
    &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Chores&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;ul&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Wash the cat&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;l1&amp;gt;&lt;/span&gt;Do the dishes&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;ul&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/template&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;h1&lt;/span&gt; &lt;span class="na"&gt;v-else-if=&lt;/span&gt;&lt;span class="s"&gt;"Homework"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; Do homework&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;h1&lt;/span&gt; &lt;span class="na"&gt;v-else&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; Watch television&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt; 😀
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;v-show&lt;/h3&gt;

&lt;p&gt;"v-show" is very similar to "v-if"&lt;/p&gt;

&lt;p&gt;The difference is that an element with "v-show" will always be rendered and remain in the DOM; "v-show" only toggles the display CSS property of the element.&lt;/p&gt;

&lt;p&gt;"v-show" does not work in the "template" element nor does it work with "v-else".&lt;/p&gt;

&lt;p&gt;"v-if" has higher toggle costs while "v-show" has higher initial render costs. So use "v-show" if you need to toggle something very often, and prefer "v-if" if the condition is unlikely to change at runtime.&lt;/p&gt;

&lt;p&gt;You could support my work by sharing this article, thanks!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://lindaojo.com/articles"&gt;Read more of my articles&lt;/a&gt;&lt;/p&gt;

</description>
      <category>vue</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Simple Explanation of Async-Await in Javascript</title>
      <dc:creator>Linda</dc:creator>
      <pubDate>Mon, 01 Feb 2021 12:05:11 +0000</pubDate>
      <link>https://dev.to/lindaojo/simple-explanation-of-async-await-in-javascript-199p</link>
      <guid>https://dev.to/lindaojo/simple-explanation-of-async-await-in-javascript-199p</guid>
      <description>&lt;p&gt;This was orginally posted at &lt;a href="https://www.lindaojo.com/blog/simple-explanation-of-async-await-in-javascript/"&gt;lindaojo.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To fully appreciate the use of Async-Await you must first understand that by default, JavaScript is synchronous.&lt;/p&gt;

&lt;h3&gt;Synchronous Functions&lt;/h3&gt;

&lt;p&gt;In synchronous functions, operations run simultaneously and you can't specify &lt;strong&gt;pausing or waiting&lt;/strong&gt; points.&lt;/p&gt;

&lt;p&gt;Example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;solveC&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;A&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;B&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;C&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;A&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;B&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;C&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;solveC&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// 3&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;But if for some reason there is a delay in getting the value 'B', JavaScript will execute other lines of code that aren't delayed. This could bring up unexpected results.&lt;/p&gt;

&lt;p&gt;In the example below, 'B' is delayed using a promise. Let's check out what the results will be.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;solveC&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;getB&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;executor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;_reject&lt;/span&gt;&lt;span class="p"&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="nx"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="mi"&gt;100&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="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;executor&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; 
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;A&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;B&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;getB&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;C&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;A&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;B&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;C&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;solveC&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// "1[object Promise]"&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;JavaScript logs the result before the promise above is fulfilled; &lt;/p&gt;

&lt;p&gt;What do we do to get the right result even if B is delayed? How do we ask Javascript to &lt;strong&gt;pause and wait&lt;/strong&gt; for 'B'.&lt;/p&gt;

&lt;p&gt;The answer is we make the function asynchronous. This is where "async-await" comes in.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: there are other ways to write asynchronous code. You could use &lt;a href="https://www.freecodecamp.org/news/javascript-callback-functions-what-are-callbacks-in-js-and-how-to-use-them/" class="link"&gt;Callback functions&lt;/a&gt; and &lt;a href="https://www.freecodecamp.org/news/javascript-promises-explained/" class="link"&gt;promises&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;Asynchronous Functions using Async-Await&lt;/h3&gt;

&lt;p&gt;To make a function Asynchronous we declare the function using the "Async" keyword.&lt;br&gt;
The word “async” before a function means the function will always returns a &lt;a class="link" href="https://medium.com/javascript-in-plain-english/truly-understanding-promises-in-javascript-cb31ee487860"&gt;promise&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The async function below...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;One&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="mi"&gt;1&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;is the same as the normal function below that returns a promise.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;One&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="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&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;We can ask JavaScript to wait for a promise to be fulfilled by using the "await" keyword. It has to be noted that it only makes the async function block wait and not the whole program execution.&lt;/p&gt;

&lt;p&gt;The code block below shows how we solve our earlier problem with the use of async-await.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;solveC&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;getB&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;executor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;_reject&lt;/span&gt;&lt;span class="p"&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="nx"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="mi"&gt;100&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="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;executor&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; 
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;A&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;B&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;getB&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;//waits for promise to be resolved&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;C&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;A&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;B&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;C&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;solveC&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// 3&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: the "await" keyword can only be used within "async" functions.&lt;/p&gt;

&lt;p&gt;That's it! Hope this was helpful cause I kept it light for beginners. If you want to read a more advanced explanation of async-await, I recommend &lt;a class="link" href="https://medium.com/javascript-in-plain-english/async-await-javascript-5038668ec6eb"&gt;this article by Ashay Mandwarya&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Updated: Made a few corrections, thank you &lt;a class="comment-mentioned-user" href="https://dev.to/peerreynders"&gt;@peerreynders&lt;/a&gt;
.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://lindaojo.com/articles"&gt;Read more of my articles&lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>javascript</category>
      <category>programming</category>
    </item>
    <item>
      <title>How to add Social Media Sharing Links to a Vue Website</title>
      <dc:creator>Linda</dc:creator>
      <pubDate>Mon, 25 Jan 2021 09:24:47 +0000</pubDate>
      <link>https://dev.to/lindaojo/how-to-add-social-media-sharing-links-to-a-vue-website-5d3l</link>
      <guid>https://dev.to/lindaojo/how-to-add-social-media-sharing-links-to-a-vue-website-5d3l</guid>
      <description>&lt;p&gt;This article was originally published on &lt;a href="https://www.lindaojo.com/blog/how-to-add-social-media-sharing-links-to-a-vue-website/" rel="noopener noreferrer"&gt;lindaojo.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the article, I share a step by step guide on how to add sharing links to your Vue website. This will enable your users to share your website page on social media with just a click of a button, literally.&lt;/p&gt;

&lt;p&gt;We are using the &lt;a href="https://www.npmjs.com/package/vue-social-sharing" rel="noopener noreferrer"&gt;Vue Social Sharing&lt;/a&gt; package to add sharing links. This package supports sharing on over 20 networks including all the favourites like Twitter, Facebook, WhatsApp, email and much more. You can &lt;a href="https://www.npmjs.com/package/vue-social-sharing" rel="noopener noreferrer"&gt;check out other supported networks&lt;/a&gt;. Let's dive in!&lt;/p&gt;

&lt;h3&gt;Install Vue Social Sharing package&lt;/h3&gt;

&lt;p&gt;Install Vue Social Sharing package by running the command below in your terminal.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

npm install --save vue-social-sharing


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

&lt;/div&gt;

&lt;h3&gt;Set up Vue Social Sharing package&lt;/h3&gt;

&lt;p&gt;You can set up the package in main.js file as shown below&lt;/p&gt;

&lt;div class="highlight js-code-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;VueSocialSharing&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;vue-social-sharing&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="nx"&gt;Vue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;VueSocialSharing&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;or import using a script tag in your index.html file&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
 html
&amp;lt;script src="/dist/vue-social-sharing.js"&amp;gt;&amp;lt;/script&amp;gt;


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

&lt;/div&gt;

&lt;h3&gt;Add Social Media sharing links using the Share Network Component&lt;/h3&gt;

&lt;p&gt;The Vue social sharing package lets you add social sharing links to multiple networks with ease, right within your template. Here are a few examples.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; the &lt;strong&gt;'network'&lt;/strong&gt; and &lt;strong&gt;'url'&lt;/strong&gt; are the only required properties.&lt;/p&gt;

&lt;p&gt;Facebook Example&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;

&lt;span class="nt"&gt;&amp;lt;template&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;button&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;ShareNetwork&lt;/span&gt;
            &lt;span class="na"&gt;network=&lt;/span&gt;&lt;span class="s"&gt;"facebook"&lt;/span&gt;
            &lt;span class="na"&gt;url=&lt;/span&gt;&lt;span class="s"&gt;"https://lindaojo.com/blog/awesome-article"&lt;/span&gt;
            &lt;span class="na"&gt;title=&lt;/span&gt;&lt;span class="s"&gt;"Awesome Article"&lt;/span&gt;
            &lt;span class="na"&gt;description=&lt;/span&gt;&lt;span class="s"&gt;"This is an awesome article for awesome readers"&lt;/span&gt;
            &lt;span class="na"&gt;hashtags=&lt;/span&gt;&lt;span class="s"&gt;"Frontend, Programming"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;span&amp;gt;&lt;/span&gt;Share on Facebook&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/ShareNetwork&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/template&amp;gt;&lt;/span&gt;



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

&lt;/div&gt;

&lt;p&gt;Twitter Example&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;

&lt;span class="nt"&gt;&amp;lt;template&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;button&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;ShareNetwork&lt;/span&gt;
            &lt;span class="na"&gt;network=&lt;/span&gt;&lt;span class="s"&gt;"twitter"&lt;/span&gt;
            &lt;span class="na"&gt;url=&lt;/span&gt;&lt;span class="s"&gt;"https://lindaojo.com/blog/another-awesome-article"&lt;/span&gt;
            &lt;span class="na"&gt;title=&lt;/span&gt;&lt;span class="s"&gt;"Another Awesome Article"&lt;/span&gt;
            &lt;span class="na"&gt;description=&lt;/span&gt;&lt;span class="s"&gt;"This is another awesome article for awesome readers"&lt;/span&gt;
            &lt;span class="na"&gt;twitter-user=&lt;/span&gt;&lt;span class="s"&gt;"LindaOjo_"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;span&amp;gt;&lt;/span&gt;Share on Twitter&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/ShareNetwork&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/template&amp;gt;&lt;/span&gt;



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

&lt;/div&gt;

&lt;p&gt;Now you can share your website on Twitter, Facebook, and much more 🎉.&lt;/p&gt;

&lt;h3&gt;Extending the network list&lt;/h3&gt;

&lt;p&gt;If the package does not support a network you desire by default, you can extend or override the list of available networks in your main.js file as shown below&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;

    &lt;span class="nx"&gt;Vue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;VueSocialSharing&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;networks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;newNetwork&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://newnetwork.com/share?url=@url&amp;amp;title=@title&lt;/span&gt;&lt;span class="dl"&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;h3&gt;Customise your sharing links on popular social media platforms (Optional)&lt;/h3&gt;

&lt;p&gt;Customising your share links makes it stand out hence increasing the likelihood of it being engaged with.&lt;/p&gt;

&lt;p&gt;For instance, a link to my website on Twitter looks like this:&lt;br&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%2Flindaojo%2Fimage%2Fupload%2Fv1606058540%2Ftwitter-card_mpspzu.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%2Flindaojo%2Fimage%2Fupload%2Fv1606058540%2Ftwitter-card_mpspzu.png" alt="twitter card"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can customise your share links by adding the right meta tags to the head section of your index.html.&lt;/p&gt;

&lt;p&gt;Below are the meta tags I used to customise my share links.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;

&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="c"&gt;&amp;lt;!-- Facebook, Whatsapp --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;property=&lt;/span&gt;&lt;span class="s"&gt;"og:site_name"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"Linda Ojo"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;property=&lt;/span&gt;&lt;span class="s"&gt;"og:title"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"Linda Ojo's Personal website and Blog"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;property=&lt;/span&gt;&lt;span class="s"&gt;"og:description"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"Articles on frontend development written by Linda Ojo, Frontend Developer"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;property=&lt;/span&gt;&lt;span class="s"&gt;"og:image"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"logo.png"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;property=&lt;/span&gt;&lt;span class="s"&gt;"og:url"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"https//www.lindaojo.com"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

     &lt;span class="c"&gt;&amp;lt;!-- Twitter --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"twitter:title"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"Linda Ojo's Personal website and Blog"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"twitter:description"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"Articles on frontend development written by Linda Ojo, Frontend Developer"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"twitter:image"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"logo.png"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;property=&lt;/span&gt;&lt;span class="s"&gt;"twitter:url"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"https//www.lindaojo.com"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"twitter:card"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"summary"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;You could support my work by sharing this article, thanks!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://lindaojo.com/articles" rel="noopener noreferrer"&gt;Read more of my articles&lt;/a&gt;&lt;/p&gt;

</description>
      <category>vue</category>
      <category>seo</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
