<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Quratulaiinn</title>
    <description>The latest articles on Forem by Quratulaiinn (@quratulaiinn).</description>
    <link>https://forem.com/quratulaiinn</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%2F859185%2Faf5c661d-23b8-424a-8fb3-21b08d737c4a.jpeg</url>
      <title>Forem: Quratulaiinn</title>
      <link>https://forem.com/quratulaiinn</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/quratulaiinn"/>
    <language>en</language>
    <item>
      <title>How to Get Started with Shopify Theme Development (For Beginners)</title>
      <dc:creator>Quratulaiinn</dc:creator>
      <pubDate>Mon, 09 Sep 2024 12:23:24 +0000</pubDate>
      <link>https://forem.com/quratulaiinn/how-to-get-started-with-shopify-theme-development-for-beginners-5ame</link>
      <guid>https://forem.com/quratulaiinn/how-to-get-started-with-shopify-theme-development-for-beginners-5ame</guid>
      <description>&lt;p&gt;So, one day you heard about Shopify and thought to learn Shopify development! &lt;/p&gt;

&lt;p&gt;You’re excited, you open your laptop, and... nothing. No solid resources, no clear starting point—just a lot of confusing guides or outdated tutorials. Sounds very frustrating, I totally get it, been there.&lt;/p&gt;

&lt;p&gt;Well, don't worry, this guide has got your back! If you're new to Shopify and serious about learning Shopify development, this is the perfect place to start.&lt;/p&gt;

&lt;h2&gt;
  
  
  Shopify Development: Two Main Paths
&lt;/h2&gt;

&lt;p&gt;There are two main areas in Shopify development:&lt;/p&gt;

&lt;p&gt;1) Shopify App Development&lt;br&gt;
2) Shopify Theme Development/Customization&lt;/p&gt;

&lt;p&gt;While you can learn both over time, it's better to start with one. This guide is all about Shopify Theme Development, but don’t worry I’ll try to cover Shopify App Development in a future post.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Shopify Theme Development?
&lt;/h2&gt;

&lt;p&gt;Shopify theme development is essentially about creating custom solutions for Shopify merchants. You can build your own theme and even sell it, but at the core of it most of the domain and the work revolves around customizing existing themes and that is what I would recommend you to go for.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why is Theme Customization Important?
&lt;/h2&gt;

&lt;p&gt;Theme customization is essential because every Shopify store has unique needs that go beyond the standard features of pre-made themes. &lt;/p&gt;

&lt;p&gt;While Shopify offers a wide range of free and premium themes, they often require customization to truly reflect a brand's identity, meet specific business goals, or offer a better user experience. &lt;/p&gt;

&lt;p&gt;Customizing a theme allows store owners to tailor the look and functionality to match their branding, add features that improve customer engagement, or integrate unique workflows without paying for costly third-party apps. &lt;/p&gt;

&lt;p&gt;Whether it’s creating a more intuitive navigation, enhancing product pages, or improving mobile responsiveness, theme customization helps businesses stand out in a competitive eCommerce landscape, driving higher conversions and customer satisfaction.&lt;/p&gt;

&lt;h2&gt;
  
  
  From Where to Start Theme Customization Journey
&lt;/h2&gt;

&lt;p&gt;I specialize in theme customization, so if you're just starting, here’s how I would suggest you to begin your journey:&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Master the Basics (HTML, CSS, and JavaScript)
&lt;/h3&gt;

&lt;p&gt;Shopify theme development is a lot like front-end web development. So, if you're already comfortable with HTML, CSS, and JavaScript, you're halfway there. If not, take some time to learn these skills before diving into Shopify. Trust me, they’re essential!&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Learn Liquid - the Core of Shopify Themes
&lt;/h3&gt;

&lt;p&gt;Liquid is Shopify’s templating language, and it's the backbone of any Shopify theme. If you don’t understand Liquid, you won’t be able to build or customize themes effectively. Shopify theme development revolves around Liquid, CSS, and JavaScript—each playing a crucial role.&lt;/p&gt;

&lt;p&gt;Finding up-to-date tutorials on Liquid can be tough, so I recommend going straight to the source: Shopify's official documentation as well as liquid documentation. It's a little dry but the most reliable place to learn. If you ever get stuck, don’t hesitate to jump into the Shopify forums for help or feel free to leave a comment below, and I’ll do my best to assist.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://shopify.dev/docs/api/liquid" rel="noopener noreferrer"&gt;Shopify Liquid Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://shopify.github.io/liquid/?shpxid=d6a7db9b-E2B8-4652-B702-76033CC69" rel="noopener noreferrer"&gt;Liquid Official Documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How Long Should You Spend on Step 1 and Step 2?
&lt;/h2&gt;

&lt;p&gt;Great question! When starting with Shopify theme development, it’s crucial to have a solid foundation in HTML, CSS, and JavaScript (Step 1) before diving into Liquid programming (Step 2).&lt;/p&gt;

&lt;p&gt;You don’t need to rush this process. Spend a few weeks getting comfortable with HTML, CSS, and JavaScript and aim to build a few sample projects to get the hang of things. This hands-on practice will make your Shopify development journey much smoother.&lt;/p&gt;

&lt;p&gt;Once you feel confident with the basics, dive into Liquid. This might take a bit longer, as Liquid has its nuances. Plan on spending several weeks learning Liquid thoroughly. Focus on understanding how it integrates with Shopify and how you can use it to create custom solutions.&lt;/p&gt;

&lt;p&gt;The key here is to take your time and really grasp each step before moving on. It’s better to build a strong foundation now than to rush and struggle later on. In my next blog, I will share more about what comes after mastering these basics.&lt;/p&gt;

&lt;p&gt;Until then happy coding..&lt;/p&gt;

&lt;p&gt;Don't forget to follow me on LinkedIn for theme customization related work inspiration and sample projects.&lt;/p&gt;

&lt;p&gt;LinkedIn: &lt;a href="https://www.linkedin.com/in/quratulain-shoro-7792721a4/" rel="noopener noreferrer"&gt;Quratulain Shoro&lt;/a&gt;&lt;/p&gt;

</description>
      <category>shopify</category>
      <category>shopifydevelopment</category>
      <category>webdev</category>
      <category>ecommerce</category>
    </item>
    <item>
      <title>JavaScript Object Properties: Dot Notation or Bracket Notation?</title>
      <dc:creator>Quratulaiinn</dc:creator>
      <pubDate>Wed, 01 Nov 2023 10:34:15 +0000</pubDate>
      <link>https://forem.com/quratulaiinn/javascript-object-properties-dot-notation-or-bracket-notation-3gk0</link>
      <guid>https://forem.com/quratulaiinn/javascript-object-properties-dot-notation-or-bracket-notation-3gk0</guid>
      <description>&lt;p&gt;When working with objects in JavaScript will you choose Dot Notation or Bracket Notation?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;screams destructuring&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Ikr, but lets understand the basics first. &lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Objects are a fundamental concept in JavaScript, serving as containers for organizing and managing data. Object properties, on the other hand, are the key-value pairs that make up these objects. &lt;/p&gt;

&lt;p&gt;In this blog, we will learn about:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Objects and object properties&lt;/li&gt;
&lt;li&gt;How to add, update, and delete object properties&lt;/li&gt;
&lt;li&gt;The differences between dot notation and bracket notation&lt;/li&gt;
&lt;/ol&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftyme2r9c20ceb3rqu6uz.gif" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftyme2r9c20ceb3rqu6uz.gif" alt="JavaScript Object"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding Objects
&lt;/h2&gt;

&lt;p&gt;Think of an object like a container, and its properties as items inside the container. For example, consider the entire book library as an object, and each book in the library is like a property of that object.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So, objects hold things (properties), just like containers hold stuff.&lt;/strong&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;const&lt;/span&gt; &lt;span class="nx"&gt;library&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;book1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;The Great Gatsby&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;author&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;F. Scott Fitzgerald&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;book2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;To Kill a Mockingbird&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;author&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Harper Lee&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="c1"&gt;// More books...&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;


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

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Here, &lt;code&gt;library&lt;/code&gt; is our object, and each &lt;code&gt;book1&lt;/code&gt;, &lt;code&gt;book2&lt;/code&gt;, and so on, are properties of the &lt;code&gt;library&lt;/code&gt; object. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Each book has its own set of properties, like &lt;code&gt;title&lt;/code&gt; and &lt;code&gt;author&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Adding Properties to Objects
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Dot Notation
&lt;/h3&gt;

&lt;p&gt;Dot notation is ideal for adding properties with fixed names. It is similar to placing a known book on a designated shelf within the library. For instance:&lt;/p&gt;


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

&lt;p&gt;&lt;span class="nx"&gt;library&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;book3&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;br&gt;
  &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Harry Potter and the Sorcerer's Stone&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;br&gt;
  &lt;span class="na"&gt;author&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;J.K. Rowling&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;br&gt;
&lt;span class="p"&gt;};&lt;/span&gt;&lt;/p&gt;

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

&lt;/div&gt;
&lt;h2&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Bracket Notation&lt;br&gt;
&lt;/h2&gt;

&lt;p&gt;Bracket notation is more dynamic and adaptable. It allows you to add properties with dynamic names, like adding a book to the library with a customizable label:&lt;/p&gt;


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

&lt;p&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;newBookNumber&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;book4&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;br&gt;
&lt;span class="nx"&gt;library&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;newBookNumber&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;br&gt;
  &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;The Hobbit&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;br&gt;
  &lt;span class="na"&gt;author&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;J.R.R. Tolkien&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;br&gt;
&lt;span class="p"&gt;};&lt;/span&gt;&lt;/p&gt;

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

&lt;/div&gt;
&lt;h2&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Updating Properties&lt;br&gt;
&lt;/h2&gt;

&lt;p&gt;Both dot and bracket notations can be used to update properties. Dot notation is suitable for known properties, while bracket notation excels for dynamic properties. &lt;/p&gt;

&lt;p&gt;For example changing the details of a book/updating the information on a library's catalog. Here's how you can update properties:&lt;/p&gt;

&lt;h3&gt;
  
  
  Dot Notation
&lt;/h3&gt;


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

&lt;p&gt;&lt;span class="nx"&gt;library&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;book1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;The Great American Novel&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;/p&gt;

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

&lt;/div&gt;
&lt;h3&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Bracket Notation&lt;br&gt;
&lt;/h3&gt;
&lt;br&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;

&lt;p&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;bookToUpdate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;book2&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;br&gt;
&lt;span class="nx"&gt;library&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;bookToUpdate&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;author&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Nelle Harper Lee&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;/p&gt;

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

&lt;/div&gt;
&lt;h2&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Deleting Properties&lt;br&gt;
&lt;/h2&gt;

&lt;p&gt;Deleting properties is like removing a book from your library's catalog. For deleting properties, both notations serve the same purpose. Use the delete keyword with dot or bracket notation to remove properties from the object.&lt;/p&gt;

&lt;h3&gt;
  
  
  Dot Notation
&lt;/h3&gt;


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

&lt;p&gt;&lt;span class="k"&gt;delete&lt;/span&gt; &lt;span class="nx"&gt;library&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;book3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;/p&gt;

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

&lt;/div&gt;
&lt;h3&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Bracket Notation&lt;br&gt;
&lt;/h3&gt;
&lt;br&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;

&lt;p&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;bookToDelete&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;book4&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;br&gt;
&lt;span class="k"&gt;delete&lt;/span&gt; &lt;span class="nx"&gt;library&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;bookToDelete&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;&lt;/p&gt;

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

&lt;/div&gt;
&lt;h2&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Key Differences between Dot and Bracket Notation&lt;br&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Dynamic vs. Static
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Dot Notation (Static)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;With dot notation, accessing properties requires prior knowledge of the property's name.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Imagine you have a car with fixed properties like "make" and "model." You know these properties in advance and access them using dot notation: &lt;code&gt;car.make&lt;/code&gt; and &lt;code&gt;car.model&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Bracket Notation (Dynamic)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Bracket notation allows dynamic access to properties, making it possible to use a variable to specify the property you want to access. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now, think of a scenario where you have a car, but you want to access a property based on user input, like "make" or "model." Bracket notation allows you to do this dynamically by using a variable to specify the property you want to access: &lt;code&gt;car[userInput]&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Handling Special Characters
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Dot Notation (Limited)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Dot notation struggles with property names containing spaces or special characters. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For instance, consider a person's name with a special character like "O'Reilly".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Accessing &lt;code&gt;person.O'Reilly&lt;/code&gt; using dot notation could result in an error.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Bracket Notation (Versatile)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Bracket notation, on the other hand, handles properties with spaces, special characters, or numbers with ease.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can easily access &lt;code&gt;person["O'Reilly"]&lt;/code&gt; without any issues.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Adding and Updating Properties
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Dot Notation (Static)
&lt;/h4&gt;

&lt;p&gt;Use dot notation when dealing with a fixed set of properties. For instance: &lt;code&gt;student.grade = "A"&lt;/code&gt; or &lt;code&gt;student.age = 23&lt;/code&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Bracket Notation (Dynamic)
&lt;/h4&gt;

&lt;p&gt;When dealing with dynamically generated data, bracket notation is more flexible. Use it to add or update properties based on the data received from an external source. For example: &lt;code&gt;student[propertyName] = propertyValue&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Whether you're crafting a web application, handling user input, or working with unconventional property names, a firm grasp of object properties and notations in JavaScript can significantly enhance your development experience.&lt;/p&gt;

&lt;p&gt;For more such content feel free to connect with me.&lt;/p&gt;

&lt;p&gt;LinkedIn: &lt;a href="https://www.linkedin.com/in/quratulain-shoro-7792721a4" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/quratulain&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/QuratAin" rel="noopener noreferrer"&gt;https://github.com/QuratAin&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Shopify And GitHub Integration</title>
      <dc:creator>Quratulaiinn</dc:creator>
      <pubDate>Tue, 31 Oct 2023 05:00:15 +0000</pubDate>
      <link>https://forem.com/quratulaiinn/shopify-and-github-integration-20a1</link>
      <guid>https://forem.com/quratulaiinn/shopify-and-github-integration-20a1</guid>
      <description>&lt;p&gt;Have you ever found yourself tangled in the complexities of Shopify theme management and version control? &lt;/p&gt;

&lt;p&gt;Are you looking for a solution to effortlessly synchronize your Shopify store with GitHub? &lt;/p&gt;

&lt;p&gt;Look no further. In this third installment of my Shopify development series, delve along with me into the intricate yet powerful process of &lt;strong&gt;Shopify and GitHub Integration&lt;/strong&gt;, providing you with the key insights and step-by-step guidance to optimize your development workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Should You Integrate Shopify With GitHub?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Shopify Theme Kit can help us in making theme development easier, why should we go for this Approach?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Shopify Theme Kit definitely was a big step in making things easier for developers to work in local environment but one of the biggest drawback it brought was in case a merchant or fellow developer intentionally or unintentionally made any changes to the theme code using theme editor, those changes wouldn't be reflected in our local environment, inviting conflicts and several bugs.  &lt;/p&gt;

&lt;p&gt;And that's when &lt;strong&gt;Shopify CLI&lt;/strong&gt; and &lt;strong&gt;Shopify GitHub Integration&lt;/strong&gt; was introduced which ensures that changes made in the Shopify theme editor are reflected in the local environment and vice versa.&lt;/p&gt;

&lt;p&gt;Lets sum up the advantages in a better way: &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Smooth Syncing:&lt;/strong&gt; When you make changes to your theme via your local development environment, the Shopify GitHub setup automatically makes sure the changes show up in your Shopify admin i.e. your online store's theme. This keeps everything looking and working the same on both ends.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Two-Way Changes:&lt;/strong&gt; Any tweaks you make in the Shopify admin get sent back to your original setup, so your progress is always up to date, no matter where you're working.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Keeping Track of Versions:&lt;/strong&gt; With Shopify GitHub, you can handle different versions of your theme by connecting them to different stages. This way, you can always go back to an earlier version if you need to.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Better Teamwork:&lt;/strong&gt; This setup makes it easy for everyone on the team to work together smoothly. You can see what everyone's doing, and everyone's on the same page with the latest updates, making everything run more smoothly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Integrate Shopify With GitHub
&lt;/h2&gt;

&lt;p&gt;In previous blog posts, I've walked you through &lt;a href="https://dev.to/quratulaiinn/setting-up-a-local-environment-for-shopify-theme-development-2ema"&gt;Setting Up A Local Development Environment For Shopify Themes&lt;/a&gt; and &lt;a href="https://www.notion.so/Shopify-And-GitHub-Integration-b7583df82af54949805daa19405e1b7c?pvs=21" rel="noopener noreferrer"&gt;Shopify Themes Version Controlling Using GitHub&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Now, it's time to tie these threads together and explore the remarkable possibilities of &lt;strong&gt;Shopify and GitHub Integration&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Connecting GitHub to Shopify
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The first crucial step is to create a connection between your Shopify store and GitHub. Login to your Shopify store and click on the &lt;strong&gt;Online Store&lt;/strong&gt; section from the sidebar on left.&lt;/li&gt;
&lt;/ul&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2oaw474rapkegn0o8b87.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2oaw474rapkegn0o8b87.png" alt="Shopify Online Store Section"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Just below your live theme, you'll find the &lt;strong&gt;Add Theme&lt;/strong&gt; option.&lt;/li&gt;
&lt;/ul&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmicy9io1hoaejgtvh7j9.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmicy9io1hoaejgtvh7j9.png" alt="Shopify Themes Section"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A dropdown menu will appear, and this is where the magic begins.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Select &lt;strong&gt;Connect from GitHub&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcuirr8cvjdl6p2orlzq2.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcuirr8cvjdl6p2orlzq2.png" alt="Connect to github"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;After you click on Connect from GitHub, on the right side you will find a button to Log in to your GitHub account.&lt;/li&gt;
&lt;/ul&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faflx1clc69axiw1drlec.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faflx1clc69axiw1drlec.png" alt="Login to github"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You will be redirected to the page where you can grant the necessary permissions. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;💡 &lt;strong&gt;This is like handing the keys to a secure vault&lt;/strong&gt; – it ensures that your Shopify store and GitHub can communicate effortlessly, making updates and collaboration a breeze.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fddg1dpdh94g62s13ruo0.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fddg1dpdh94g62s13ruo0.png" alt="github access"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can choose to allow Shopify access specific repositories only instead of giving access to all of your repositories. Check &lt;strong&gt;Only select repositories&lt;/strong&gt; radio button and then Select the name of repository from dropdown and click &lt;strong&gt;Install&lt;/strong&gt;. &lt;/li&gt;
&lt;/ul&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F335y0ewxi3rle0mqww4o.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F335y0ewxi3rle0mqww4o.png" alt="select repository"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Select Repository and Branch
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once you've connected GitHub to your Shopify store, it's time to get down to business. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Choose your GitHub account &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select the repository you created earlier or the one which contains your Shopify Theme. This repository is your treasure chest of code, where your theme's journey begins.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F59g2eiq50gel03yb2iux.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F59g2eiq50gel03yb2iux.png" alt="Select repository"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You'll be asked to choose a branch. Opt for the branch of your choice and click &lt;strong&gt;Connect&lt;/strong&gt;. This is where the beauty of version control shines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;By selecting the main branch, you ensure that the live store doesn’t get affected with untested changes. &lt;/li&gt;
&lt;li&gt;By selecting the development branch, you ensure that changes and updates can be meticulously tracked and reviewed before making them live.&lt;/li&gt;
&lt;/ul&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1jzkh7qvhwmtzwkx4z5k.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1jzkh7qvhwmtzwkx4z5k.png" alt="Choose branch"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💡 You can connect only branches that match the default Shopify theme folder structure. Folders in the repository that don't match this structure are ignored.&lt;/p&gt;

&lt;h4&gt;
  
  
  Shopify Theme Folder Structure:
&lt;/h4&gt;

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

&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;assets&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;config&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;layout&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;locales&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;sections&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;snippets&lt;/span&gt;
&lt;span class="err"&gt;└──&lt;/span&gt; &lt;span class="nx"&gt;templates&lt;/span&gt;
    &lt;span class="err"&gt;└──&lt;/span&gt; &lt;span class="nx"&gt;customers&lt;/span&gt;



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

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;At this point, you will notice a newly added theme in your Theme Library:&lt;/strong&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feik84zvlmpgbmd0zc5z3.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feik84zvlmpgbmd0zc5z3.png" alt="theme library's themes"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Create and Publish Themes
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Step 5:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now, it's time for the creative part. Create two distinct themes by connecting to both branches, one for development and another for the main branch. This dual-theme approach provides a safe haven for experimenting without disrupting your live theme.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsbve3z2d8yfqghyxgakh.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsbve3z2d8yfqghyxgakh.png" alt="development theme"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 6:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;But the magic truly happens when you publish the theme created from the main branch. This action takes your development live and showcases your carefully crafted changes to your customers.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fln7k2aewt8bu08mamqbl.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fln7k2aewt8bu08mamqbl.png" alt="publish theme"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion:
&lt;/h2&gt;

&lt;p&gt;By integrating Shopify and GitHub, you've harnessed the power of version control, collaboration, and streamlined development. Your journey towards a more efficient and error-free Shopify development process has just begun.&lt;/p&gt;

&lt;p&gt;For more Shopify tips and tricks, feel free to connect with me.&lt;/p&gt;

&lt;p&gt;LinkedIn: &lt;a href="https://www.linkedin.com/in/quratulain-shoro-7792721a4/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/quratulain&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/QuratAin" rel="noopener noreferrer"&gt;https://github.com/QuratAin&lt;/a&gt;&lt;/p&gt;

</description>
      <category>shopify</category>
      <category>github</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Why You Should Never Use (==) in JavaScript</title>
      <dc:creator>Quratulaiinn</dc:creator>
      <pubDate>Mon, 30 Oct 2023 05:55:35 +0000</pubDate>
      <link>https://forem.com/quratulaiinn/why-you-should-never-use-in-javascript-1lo0</link>
      <guid>https://forem.com/quratulaiinn/why-you-should-never-use-in-javascript-1lo0</guid>
      <description>&lt;p&gt;While this topic may appear basic and familiar but I think we've all been there, using &lt;code&gt;==&lt;/code&gt; when &lt;code&gt;===&lt;/code&gt; was the better choice, only to wonder why our code behaves strangely.&lt;/p&gt;

&lt;p&gt;So no "&lt;em&gt;ugh you didn't even know this silly, it was so simple&lt;/em&gt;" comments please and let's unravel the mysteries of JavaScript's equality operators together.&lt;/p&gt;

&lt;h2&gt;
  
  
  Loose Equality
&lt;/h2&gt;

&lt;p&gt;The loose equality operator &lt;code&gt;==&lt;/code&gt; is designed for type coercion (datatype conversion), allowing JavaScript to convert operands to a common type &lt;strong&gt;BEFORE&lt;/strong&gt; comparison. &lt;/p&gt;

&lt;p&gt;While this can be convenient, it can also lead to subtle bugs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example 1: String and Number
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&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;10&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="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;10&lt;/span&gt;&lt;span class="dl"&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="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="c1"&gt;// Result: true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Even though &lt;code&gt;a&lt;/code&gt; is a number and &lt;code&gt;b&lt;/code&gt; is a string, we get true. This is because the type of the variable &lt;code&gt;a&lt;/code&gt; is converted to a string before making the comparison.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After the comparison, the value is checked in both the variables. If it's same, we will get true otherwise we will get false. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;But that's not a problem, at least the values are same?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Haha, just wait for it..&lt;/p&gt;

&lt;h3&gt;
  
  
  Example 2: NaN Comparison
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kc"&gt;NaN&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="kc"&gt;NaN&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="c1"&gt;// Result: false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Due to the complexities of &lt;code&gt;NaN&lt;/code&gt;, using &lt;code&gt;==&lt;/code&gt; to compare &lt;code&gt;NaN&lt;/code&gt; values will ALWAYS return false. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For &lt;code&gt;NaN&lt;/code&gt; checks, use &lt;code&gt;isNaN()&lt;/code&gt; or a strict comparison: &lt;code&gt;===&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example 3: String and Boolean
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&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="kc"&gt;true&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="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;true&lt;/span&gt;&lt;span class="dl"&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="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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;If you thought the answer is true, unfortunately that's not correct.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Surprised huh?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;If either operand is a &lt;strong&gt;Boolean&lt;/strong&gt;, it will be converted to a number (true becomes 1 and false becomes 0). &lt;br&gt;
&lt;strong&gt;Now, you know why the answer was true, not false in the above example.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It is because the value of the variable &lt;code&gt;a&lt;/code&gt; (true) gets converted to a number before the comparison. So after comparison, we're basically comparing &lt;code&gt;1&lt;/code&gt; and &lt;code&gt;'true'&lt;/code&gt; hence we get false because the variables contain different values.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Pretty unexpected behavior, &lt;strong&gt;I TOLD YOU.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Hence many experienced developers favor strict equality operator &lt;code&gt;===&lt;/code&gt; for its strictness, as it reduces ambiguity and encourages explicit type handling.&lt;/p&gt;

&lt;h2&gt;
  
  
  Strict Equality
&lt;/h2&gt;

&lt;p&gt;The strict equality operator &lt;code&gt;===&lt;/code&gt; is, well, very strict. It compares both &lt;strong&gt;value&lt;/strong&gt; and &lt;strong&gt;type&lt;/strong&gt;, making it more predictable and less prone to unexpected results.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example 1: String and Number
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;5&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Result: false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since the types are different, the comparison returns &lt;code&gt;false&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example 2: Boolean and Number
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Result: false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this case, false and 0 have different types, so the comparison is &lt;code&gt;false&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In JavaScript, clarity and predictability are vital. While loose equality operator can be convenient, it introduces potential pitfalls and surprises. The choice between &lt;code&gt;==&lt;/code&gt; and &lt;code&gt;===&lt;/code&gt; depends on your intent and having knowledge of both of the operators is must but there are reasons you should avoid using &lt;code&gt;==&lt;/code&gt; in your code as we discussed above. &lt;/p&gt;

&lt;p&gt;Hope it helps!&lt;/p&gt;

&lt;p&gt;For more such content feel free to connect with me.&lt;/p&gt;

&lt;p&gt;LinkedIn: &lt;a href="https://www.linkedin.com/in/quratulain-shoro-7792721a4/"&gt;https://www.linkedin.com/in/quratulain&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/QuratAin"&gt;https://github.com/QuratAin&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>react</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Shopify Theme Version Controlling Using GitHub</title>
      <dc:creator>Quratulaiinn</dc:creator>
      <pubDate>Fri, 27 Oct 2023 14:24:22 +0000</pubDate>
      <link>https://forem.com/quratulaiinn/shopify-theme-version-controlling-using-github-514i</link>
      <guid>https://forem.com/quratulaiinn/shopify-theme-version-controlling-using-github-514i</guid>
      <description>&lt;p&gt;Previously we learnt how to successfully &lt;a href="https://dev.to/quratulaiinn/setting-up-a-local-environment-for-shopify-theme-development-2ema"&gt;Set Up Your Local Environment For Shopify theme development&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now Lets explore theme version controlling, an essential practice for seamless collaboration and efficient management of your Shopify store's themes. &lt;/p&gt;

&lt;p&gt;In this blog, we will discuss the step-by-step process of moving your development theme to GitHub and collaborating with your team members efficiently.&lt;/p&gt;

&lt;h2&gt;
  
  
  Learning Outcomes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Connect Shopify Development Theme With GitHub&lt;/li&gt;
&lt;li&gt;Create A Remote Repository On GitHub&lt;/li&gt;
&lt;li&gt;Link Your Local And Remote Repositories&lt;/li&gt;
&lt;li&gt;Push Your Changes To GitHub&lt;/li&gt;
&lt;li&gt;Create A Development Branch&lt;/li&gt;
&lt;li&gt;Merge Development Branch With Default Branch&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Lets Connect Shopify Development Theme With GitHub
&lt;/h2&gt;

&lt;p&gt;Version controlling begins with setting up your local repository and linking it to GitHub. &lt;/p&gt;

&lt;p&gt;Using a good version control system helps you work together easily and makes sure you don't lose any old versions of your project. It also helps you add new things to your project without any problems. &lt;/p&gt;

&lt;p&gt;If you are not familiar with VCS you can read &lt;a href="https://dev.to/hasabtech/git-basics-in-nutshell-248b"&gt;this series&lt;/a&gt; which explains everything in easiest possible way.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Initialize Your Local Repository
&lt;/h3&gt;

&lt;p&gt;Here &lt;strong&gt;local repository&lt;/strong&gt; basically refers to the project directory having our Shopify theme that we pulled from our store. &lt;/p&gt;

&lt;p&gt;Please follow the blog &lt;a href="https://dev.to/quratulaiinn/setting-up-a-local-environment-for-shopify-theme-development-2ema"&gt;here&lt;/a&gt; if you haven't setup your environment yet. &lt;/p&gt;

&lt;p&gt;So the first step towards managing your project with Git is to initialize it. Follow these simplified steps:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Initialize Git In Your Project Directory&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Open your project directory in your preferred code editor and initialize Git by running the following command:&lt;/p&gt;

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

git init


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

&lt;/div&gt;

&lt;p&gt;This command initializes a new Git repository in your project folder, enabling Git to start tracking changes in your files.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frpcvzhi57v5c07y51g6q.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frpcvzhi57v5c07y51g6q.png" alt="Git Bash Commands"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Add Your Files To The Staging Area&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To begin tracking changes in your files, you need to add them to the staging area. Run the command:&lt;/p&gt;

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

git add &lt;span class="nb"&gt;.&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;This command stages all the files in your project directory for the next commit. &lt;/p&gt;

&lt;p&gt;Ensure that you've added all the necessary files and directories before proceeding.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F335g4z53cz7uvkpd3wks.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F335g4z53cz7uvkpd3wks.png" alt="Git Bash Commands"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Make Your Initial Commit&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once your files are staged, it's time to make your initial commit. Use the following command:&lt;/p&gt;

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

git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Initial Commit"&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;By executing this command, you create a snapshot of the current state of your project.&lt;/p&gt;

&lt;p&gt;💡 Adding a meaningful commit message is crucial as it helps you and your team members understand the changes made in this particular commit.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcruvais6zlh7inyi9lm2.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcruvais6zlh7inyi9lm2.png" alt="Git Bash Commands"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Create A Remote Repository on GitHub
&lt;/h3&gt;

&lt;p&gt;To ensure that your local changes are saved on GitHub, follow these steps:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Create A New Repository&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Open GitHub and log in to your account.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click on the '&lt;strong&gt;+&lt;/strong&gt;' icon in the top right corner and select "&lt;strong&gt;New repository&lt;/strong&gt;".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose an appropriate name for your repository in which you will push your development theme and configure other settings as needed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Finally click on the "&lt;strong&gt;Create repository&lt;/strong&gt;" button to generate your new remote repository on GitHub.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8dukxzv03i3kzy23yjqs.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8dukxzv03i3kzy23yjqs.png" alt="GitHub Create Repository Page"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Link Local And Remote Repositories&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After creating the remote repository on GitHub, you need to connect it to your local repository.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command 1: Add Remote Repository URL&lt;/strong&gt;&lt;/p&gt;

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

git remote add origin your-repository-url


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

&lt;/div&gt;

&lt;p&gt;Replace &lt;strong&gt;&lt;code&gt;your-repository-url&lt;/code&gt;&lt;/strong&gt; with the URL of the remote repository you created on GitHub. &lt;/p&gt;

&lt;p&gt;This command establishes a connection between your local and remote repositories.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command 2: Push Your Changes To GitHub&lt;/strong&gt;&lt;/p&gt;

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

git push &lt;span class="nt"&gt;-u&lt;/span&gt; origin default-branch-name


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

&lt;/div&gt;

&lt;p&gt;Don't forget to replace &lt;code&gt;default-branch-name&lt;/code&gt; with the actual name of your branch. In my case its &lt;code&gt;master&lt;/code&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyj42vovg0snz8jo786jj.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyj42vovg0snz8jo786jj.png" alt="Git Bash Commands"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This command sends the initial commit from your local repository to the remote repository on GitHub. &lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;&lt;code&gt;-u&lt;/code&gt;&lt;/strong&gt; flag sets the upstream branch, enabling you to use &lt;strong&gt;&lt;code&gt;git push&lt;/code&gt;&lt;/strong&gt; for future pushes without specifying the remote repository's path or branch name.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;At this point if you will refresh your GitHub repository you will see all of your theme files are now available on GitHub.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;💡 It's important to ensure that the local and remote branches have the same name to prevent any confusion during synchronization.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implement A Development Branch Workflow
&lt;/h2&gt;

&lt;p&gt;To ensure a seamless and error-free development process, it's highly recommended to adopt a development branch workflow.&lt;/p&gt;

&lt;p&gt;This approach helps making changes in a dedicated development branch before merging them into the default branch. &lt;/p&gt;

&lt;p&gt;💡 An additional benefit of this workflow is when you want to integrate Shopify with your GitHub account, it allows you to maintain the development branch as your unpublished theme and continually apply changes to it, while the default branch remains as your live theme. Once you've tested the development branch changes on your online store, you can merge them with the main branch.&lt;/p&gt;

&lt;p&gt;Here are remaining steps to implement this workflow:&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Create A Development Branch
&lt;/h3&gt;

&lt;p&gt;Execute following command to create a new branch called &lt;code&gt;development&lt;/code&gt;:&lt;/p&gt;

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

git checkout &lt;span class="nt"&gt;-b&lt;/span&gt; development


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

&lt;/div&gt;

&lt;p&gt;This command creates a new branch named "development" and switches to it, enabling you to work on new features and modifications without affecting the stable version.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr7e9mvyw8ksdy3q09jn3.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr7e9mvyw8ksdy3q09jn3.png" alt="Git Bash Commands"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Make Changes In Development Branch
&lt;/h3&gt;

&lt;p&gt;In case you have made any changes in your development branch, lets say added a new feature, fixed a bug, or made any other modification, you can commit those changes by using the commands below:&lt;/p&gt;

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

git add &lt;span class="nb"&gt;.&lt;/span&gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Add feature XYZ"&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo8rubb67uwxj8f4q6pxv.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo8rubb67uwxj8f4q6pxv.png" alt="Git Bash Commands"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Merge Development Branch With Default Branch
&lt;/h3&gt;

&lt;p&gt;Once the changes are thoroughly tested and verified, merge the development branch with the default branch which in my case is &lt;code&gt;master&lt;/code&gt;.&lt;/p&gt;

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

git checkout default-branch-name
git merge development


&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9yervnh56zhr4sngpdtp.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9yervnh56zhr4sngpdtp.png" alt="Git Bash Commands"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This process integrates the tested changes into the stable version, ensuring that your default branch always reflects the latest error-free version of your theme.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In conclusion, integrating version control practices into your theme development process significantly enhances collaboration, minimizes errors, and facilitates efficient management of your Shopify themes. &lt;/p&gt;

&lt;p&gt;Take advantage of the tools and best practices outlined in this guide to elevate your theme development process within the comfort of your local environment as well to foster a productive and collaborative environment for your team members by making your theme available on GitHub.&lt;/p&gt;

&lt;p&gt;For more Shopify tips and tricks, feel free to connect with me.&lt;/p&gt;

&lt;p&gt;LinkedIn: &lt;a href="https://www.linkedin.com/in/quratulain-shoro-7792721a4/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/quratulain&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/QuratAin" rel="noopener noreferrer"&gt;https://github.com/QuratAin&lt;/a&gt;&lt;/p&gt;

</description>
      <category>shopify</category>
      <category>github</category>
      <category>git</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Setting Up A Local Environment For Shopify Theme Development</title>
      <dc:creator>Quratulaiinn</dc:creator>
      <pubDate>Thu, 26 Oct 2023 14:10:15 +0000</pubDate>
      <link>https://forem.com/quratulaiinn/setting-up-a-local-environment-for-shopify-theme-development-2ema</link>
      <guid>https://forem.com/quratulaiinn/setting-up-a-local-environment-for-shopify-theme-development-2ema</guid>
      <description>&lt;p&gt;A local development environment acts as a secure workspace for developers to fine-tune their Shopify themes without the worry of affecting the live store. In this tutorial, we'll explore Shopify CLI, which allows us to effortlessly extract any theme from our Shopify store. &lt;/p&gt;

&lt;p&gt;Follow along to learn to customize Shopify themes within the comfort of your local setup.&lt;/p&gt;

&lt;h2&gt;
  
  
  What You'll Learn
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Setup Your Local Development Environment&lt;/li&gt;
&lt;li&gt;Clone Shopify Store’s Theme&lt;/li&gt;
&lt;li&gt;Preview Changes Made To Your Local Code&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before you get started, make sure you have the following:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Shopify Partner Account And Shopify Store:&lt;/strong&gt; If you want to use a development store to work on a theme, then create or log in to a &lt;a href="https://partners.shopify.com/signup?shpxid=65695602-A6D2-4EFA-24D7-4A732B5BBF96" rel="noopener noreferrer"&gt;Shopify Partner account&lt;/a&gt;, and then create a development store if you don’t already have one.&lt;br&gt;
If you want to work on an already setup store, make sure you either have a have a &lt;a href="https://shopify.dev/docs/themes/tools/collaborator-accounts" rel="noopener noreferrer"&gt;collaborator account&lt;/a&gt; or &lt;a href="https://help.shopify.com/manual/your-account/staff-accounts" rel="noopener noreferrer"&gt;staff account&lt;/a&gt; with the &lt;strong&gt;Manage themes&lt;/strong&gt; permission or &lt;strong&gt;Themes&lt;/strong&gt; permission for that store, or you're the store owner.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Node.js:&lt;/strong&gt; Install the latest version of &lt;a href="https://nodejs.org/en/download" rel="noopener noreferrer"&gt;Node.js&lt;/a&gt;, as it is essential for running the necessary tools for Shopify theme development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Git:&lt;/strong&gt; &lt;a href="https://git-scm.com/downloads" rel="noopener noreferrer"&gt;Install Git&lt;/a&gt; to manage version control and easily collaborate with other developers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Shopify CLI:&lt;/strong&gt; Ensure that you have Shopify CLI installed on your system along with everything mentioned in Shopify CLI docs. If you haven't installed it yet, please first refer to the &lt;a href="https://shopify.dev/docs/themes/tools/cli/install" rel="noopener noreferrer"&gt;Shopify CLI documentation&lt;/a&gt; for instructions on installation and then you can use the command given below.&lt;/p&gt;

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

npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @shopify/cli @shopify/theme


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

&lt;/div&gt;
&lt;h2&gt;
  
  
  Why Local Environment Setup?
&lt;/h2&gt;

&lt;p&gt;Here are some compelling reasons why setting up a local environment is crucial for Shopify theme development:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Enhanced Workflow Efficiency:&lt;/strong&gt; Working on a local environment enables faster development cycles and facilitates more efficient collaboration among team members. Developers can swiftly test and implement changes without the delays associated with live deployments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Minimized Risks And Errors:&lt;/strong&gt; Local environments offer a controlled setting for developers to experiment with new features and designs. This reduces the possibility of introducing errors or bugs directly into the live store, ultimately enhancing the overall stability of the platform.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Optimized Theme Customization:&lt;/strong&gt; A local development environment empowers developers to customize themes with greater flexibility and precision. It allows for detailed testing of various design elements and functionalities, ensuring an exceptional end-user experience on the live store.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  Setup Your Local Development Environment
&lt;/h2&gt;

&lt;p&gt;Now, let's delve into the step-by-step process of setting up your local development environment for Shopify theme development using Shopify CLI.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 1: Create A Project Folder
&lt;/h3&gt;

&lt;p&gt;Establish a dedicated folder for your project and navigate to it:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nb"&gt;mkdir &lt;/span&gt;your-folder-name
&lt;span class="nb"&gt;cd &lt;/span&gt;your-folder-name


&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsbj2a502v2yulovjxu40.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsbj2a502v2yulovjxu40.png" alt="Git Bash Commands" width="535" height="213"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Pull Your Store's Theme
&lt;/h3&gt;

&lt;p&gt;Fetch your store's theme to your local system using the following command:&lt;/p&gt;

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

shopify theme pull &lt;span class="nt"&gt;--store&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your-store-name.myshopify.com


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

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;If its your first time running the above command, you will be prompted to log in to Shopify.&lt;/li&gt;
&lt;li&gt;If you have already logged in to your store at least once, you will be directly asked to choose the theme.&lt;/li&gt;
&lt;li&gt;Select the theme of your choice and hit enter so the download can begin.&lt;/li&gt;
&lt;/ul&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fglhfgneqrki13lesnznw.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fglhfgneqrki13lesnznw.png" alt="Git Bash Commands" width="800" height="101"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Once the theme is downloaded, proceed to the subsequent steps.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Open Your Code Editor
&lt;/h3&gt;

&lt;p&gt;Launch your preferred code editor and load the project folder you created earlier.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5ihlfhjiqbl1r0r03x5g.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5ihlfhjiqbl1r0r03x5g.png" alt="Folder View in VS Code" width="800" height="275"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can see all the files that were present in your store’s theme are now available in your local folder.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Initialize Theme Development
&lt;/h3&gt;

&lt;p&gt;Execute the subsequent command in your code editor's terminal (ensure you're in your project directory):&lt;/p&gt;

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

shopify theme dev


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

&lt;/div&gt;

&lt;p&gt;💡 This command will create a development theme, enabling you to make modifications locally without impacting your live store.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7qqd4ij4jkyfjauqqg70.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7qqd4ij4jkyfjauqqg70.png" alt="Git Bash Commands" width="800" height="331"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5: Preview Development Theme In Local Environment
&lt;/h3&gt;

&lt;p&gt;After you run &lt;code&gt;shopify theme dev&lt;/code&gt; , you can interact with your theme in browser. Shopify CLI uploads the theme as a development theme on the store.&lt;/p&gt;

&lt;p&gt;The command returns a URL that hot reloads local changes allowing you to preview changes in real time using the store's data. &lt;/p&gt;

&lt;p&gt;You can navigate to &lt;code&gt;http://127.0.0.1:9292&lt;/code&gt; to open the theme preview in your browser.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2psgzqbioo8m0oxzndzq.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2psgzqbioo8m0oxzndzq.png" alt="Shopify Theme Preview" width="800" height="421"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 6: Preview Changes Made In Your Local Code
&lt;/h3&gt;

&lt;p&gt;Feel free to modify the code of your development theme and preview the changes in real-time. Lets say, you might want to adjust the text displayed in your store's announcement bar.&lt;/p&gt;

&lt;p&gt;As shown in the image below, I've updated the text in the announcement bar within my local environment, while my live theme remains unaffected. &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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxb0yb5qtytfitrt9foyx.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxb0yb5qtytfitrt9foyx.png" alt="Shopify Theme Preview" width="800" height="332"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💡 Now you can make changes, preview them and when you're satisfied with your changes, you can seamlessly push them to your GitHub repository and subsequently deploy them to your live store.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Setting up a local environment for Shopify theme development lays the foundation for a streamlined and error-free development process. This setup ensures that your customers enjoy an exceptional shopping experience on your Shopify store while allowing you to seamlessly make and review alterations before deploying them live.&lt;/p&gt;

&lt;p&gt;For more Shopify tips and tricks, feel free to connect with me.&lt;br&gt;
LinkedIn: &lt;a href="https://www.linkedin.com/in/quratulain-shoro-7792721a4/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/quratulain&lt;/a&gt;&lt;br&gt;
GitHub: &lt;a href="https://github.com/QuratAin" rel="noopener noreferrer"&gt;https://github.com/QuratAin&lt;/a&gt;&lt;/p&gt;

</description>
      <category>shopify</category>
      <category>shopifydev</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
