<?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: nour</title>
    <description>The latest articles on DEV Community by nour (@nourbouch).</description>
    <link>https://dev.to/nourbouch</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%2F1462286%2F93509027-3a6a-4d8c-ab7c-1b6d363beabd.png</url>
      <title>DEV Community: nour</title>
      <link>https://dev.to/nourbouch</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nourbouch"/>
    <language>en</language>
    <item>
      <title>How It Differs from HTML and Differences</title>
      <dc:creator>nour</dc:creator>
      <pubDate>Thu, 02 May 2024 15:25:01 +0000</pubDate>
      <link>https://dev.to/nourbouch/understanding-xml-how-it-differs-from-html-pj8</link>
      <guid>https://dev.to/nourbouch/understanding-xml-how-it-differs-from-html-pj8</guid>
      <description>&lt;p&gt;Hey Devs!&lt;/p&gt;

&lt;p&gt;Let’s delve into the world of markup languages and unravel the mysteries of XML (eXtensible Markup Language) while distinguishing it from HTML (HyperText Markup Language). While both XML and HTML are markup languages, they serve different purposes and have distinct features.&lt;/p&gt;

&lt;h2&gt;
  
  
  XML (eXtensible Markup Language):
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Extensibility&lt;/strong&gt;: As the name suggests, XML is extensible, meaning you can define your own tags and structure, making it highly adaptable to various data formats and requirements.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data Representation&lt;/strong&gt;: XML primarily focuses on describing data. It’s commonly used in situations where data needs to be stored, exchanged, or processed independently of presentation. This makes it ideal for tasks such as configuration files, data interchange between systems, and representing hierarchical data structures.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Syntax&lt;/strong&gt;: XML has strict syntax rules. Every opening tag must have a corresponding closing tag, and attributes must be quoted. This ensures consistency and clarity in data representation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Validation&lt;/strong&gt;: XML allows the use of Document Type Definitions (DTD) or XML Schemas to define the structure and validate the content against predefined rules. This ensures data integrity and helps in error detection.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;5.&lt;strong&gt;Complexity&lt;/strong&gt;: XML supports complex data structures and nesting, making it suitable for representing hierarchical data with multiple levels of relationships. &lt;/p&gt;

&lt;h2&gt;
  
  
  HTML (HyperText Markup Language):
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Presentation&lt;/strong&gt;: Unlike XML, HTML is primarily concerned with the presentation of content on the web. It defines the structure of web pages using elements like &lt;/p&gt;, &lt;p&gt;, &lt;/p&gt;
&lt;h1&gt;, etc., along with attributes for styling and layout.
&lt;/h1&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Fixed Tags&lt;/strong&gt;: HTML has a predefined set of tags and attributes designed specifically for creating web pages. While it offers some flexibility through classes and IDs, the core structure remains fixed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Rendering&lt;/strong&gt;: HTML is rendered by web browsers to display content visually. It includes features like links, images, forms, and multimedia elements that enhance the user experience.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Simplicity&lt;/strong&gt;: HTML syntax is simpler compared to XML. It allows for optional closing tags and is forgiving of minor syntax errors, which makes it more forgiving for writing web pages.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Interactivity&lt;/strong&gt;: HTML can incorporate JavaScript for adding interactivity and dynamic behavior to web pages, making them more engaging and responsive.&lt;/p&gt;&lt;/li&gt;

&lt;h2&gt;
  
  
  Differences:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Purpose&lt;/strong&gt;: XML is designed for data representation and exchange, while HTML is designed for content presentation on the web.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Extensibility&lt;/strong&gt;: XML is highly extensible, allowing for custom tags and structures, whereas HTML has a fixed set of tags tailored for web development.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Syntax&lt;/strong&gt;: XML has strict syntax rules, while HTML syntax is more forgiving and designed for ease of use.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Validation&lt;/strong&gt;: XML supports validation against predefined schemas, ensuring data integrity, while HTML relies on browser interpretation for rendering.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Complexity&lt;/strong&gt;: XML supports complex data structures and nesting, making it suitable for diverse data representation needs, while HTML focuses on simplicity and ease of use for web development.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Understanding the distinctions between XML and HTML is crucial for choosing the right tool for your specific requirements, whether it's data representation, web development, or content management.&lt;/p&gt;

&lt;p&gt;Keep coding!&lt;br&gt;
[Nourbouch]&lt;/p&gt;


&lt;/ol&gt;

</description>
      <category>xml</category>
      <category>html</category>
    </item>
    <item>
      <title>Create Dark and Light Modes via CSS for Astro sites</title>
      <dc:creator>nour</dc:creator>
      <pubDate>Thu, 02 May 2024 13:26:20 +0000</pubDate>
      <link>https://dev.to/nourbouch/create-dark-and-light-modes-via-css-variables-for-astrojs-sites-3bid</link>
      <guid>https://dev.to/nourbouch/create-dark-and-light-modes-via-css-variables-for-astrojs-sites-3bid</guid>
      <description>&lt;p&gt;In this post, we’ll look at how to add support for dark mode to your website in two ways: first with CSS and then with a JavaScript toggle.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites I highly recommend you go ahead and fork a Astro starter from &lt;a href="https://astro.new/latest"&gt;Astro.new&lt;/a&gt;.
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwdfij17wavvbuvn4huww.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwdfij17wavvbuvn4huww.png" alt="Image description" width="800" height="433"&gt;&lt;/a&gt;&lt;br&gt;
You can choose a template of your choice and then open the template in &lt;a href="https://codesandbox.io/p/devbox/divine-leftpad-27v5l"&gt;CodeSandbox&lt;/a&gt; which will automatically handle the required dependencies.&lt;/p&gt;
&lt;h2&gt;
  
  
  Creating our Dark Mode Component
&lt;/h2&gt;

&lt;p&gt;Inside the components folder, I’ve added a new component called ThemeChange.astro. It’s basic functionality includes a clickable element alongside our svg images for our toggle.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="theme-switch-wrapper"&amp;gt;
          &amp;lt;label class="theme-switch" for="checkbox"&amp;gt;
            &amp;lt;input type="checkbox" id="checkbox" /&amp;gt;
            &amp;lt;div class="slider"&amp;gt;
              &amp;lt;svg
                xmlns="http://www.w3.org/2000/svg"
                width="16"
                height="16"
                viewBox="0 0 24 24"
                fill="#FCD53F"
                stroke="currentColor"
                stroke-width="2"
                stroke-linecap="round"
                stroke-linejoin="round"
                class="feather feather-sun"
              &amp;gt;
                &amp;lt;circle cx="12" cy="12" r="5"&amp;gt;&amp;lt;/circle&amp;gt;
                &amp;lt;line x1="12" y1="1" x2="12" y2="3"&amp;gt;&amp;lt;/line&amp;gt;
                &amp;lt;line x1="12" y1="21" x2="12" y2="23"&amp;gt;&amp;lt;/line&amp;gt;
                &amp;lt;line x1="4.22" y1="4.22" x2="5.64" y2="5.64"&amp;gt;&amp;lt;/line&amp;gt;
                &amp;lt;line x1="18.36" y1="18.36" x2="19.78" y2="19.78"&amp;gt;&amp;lt;/line&amp;gt;
                &amp;lt;line x1="1" y1="12" x2="3" y2="12"&amp;gt;&amp;lt;/line&amp;gt;
                &amp;lt;line x1="21" y1="12" x2="23" y2="12"&amp;gt;&amp;lt;/line&amp;gt;
                &amp;lt;line x1="4.22" y1="19.78" x2="5.64" y2="18.36"&amp;gt;&amp;lt;/line&amp;gt;
                &amp;lt;line x1="18.36" y1="5.64" x2="19.78" y2="4.22"&amp;gt;&amp;lt;/line&amp;gt;
              &amp;lt;/svg&amp;gt;
              &amp;lt;svg
                xmlns="http://www.w3.org/2000/svg"
                width="16"
                height="16"
                viewBox="0 0 24 24"
                fill="#FCD53F"
                stroke="currentColor"
                stroke-width="2"
                stroke-linecap="round"
                stroke-linejoin="round"
                class="feather feather-moon"
              &amp;gt;
                &amp;lt;path
                  d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"
                &amp;gt;&amp;lt;/path&amp;gt;
              &amp;lt;/svg&amp;gt;
            &amp;lt;/div&amp;gt;
          &amp;lt;/label&amp;gt;
        &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We’ll immediately import this component into the Header component.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import HeaderLink from './HeaderLink.astro';
import { SITE_TITLE } from '../config';
import Toggle from './ThemeChange.astro';
---

&amp;lt;header&amp;gt;
    &amp;lt;Toggle /&amp;gt;
    &amp;lt;h2&amp;gt;
        {SITE_TITLE}
    &amp;lt;/h2&amp;gt;
    &amp;lt;nav&amp;gt;
        &amp;lt;HeaderLink href="/"&amp;gt;Home&amp;lt;/HeaderLink&amp;gt;
        &amp;lt;HeaderLink href="/blog"&amp;gt;Blog&amp;lt;/HeaderLink&amp;gt;
        &amp;lt;HeaderLink href="/about"&amp;gt;About&amp;lt;/HeaderLink&amp;gt;
        &amp;lt;HeaderLink href="https://twitter.com/astrodotbuild" target="_blank"&amp;gt;Twitter&amp;lt;/HeaderLink&amp;gt;
        &amp;lt;HeaderLink href="https://github.com/withastro/astro" target="_blank"&amp;gt;GitHub&amp;lt;/HeaderLink&amp;gt;
    &amp;lt;/nav&amp;gt;
&amp;lt;/header&amp;gt;
&amp;lt;style&amp;gt;
    header {
        margin: 0em 0 2em;
    }
    h2 {
        margin: 0.5em 0;
    }
&amp;lt;/style&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Using CSS variables for themes
&lt;/h2&gt;

&lt;p&gt;CSS Variables enable us to define reusable values that can be changed at runtime. First, on the root element, define all available colours. Then, using these colours, create two opposing data-themes: light and dark.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;:root {
  --color-bg: #f2f2f2;
  --color-text: #444444;
  --bold-text: #222;
  --nav-text: #000000;
  --code: #f2f2f2;
  --block-quote-border: #999;
  --block-quote-text: #222;
  --slider-bg: #dddddd;
  --slider-bg-before: #fff;
  --slider-input-bg: #8758ff;
}

[data-theme="light"] {
  --color-bg: #f2f2f2;
  --color-text: #444444;
  --bold-text: #222;
  --nav-text: #000000;
  --code: #f2f2f2;
  --block-quote-border: #999;
  --block-quote-text: #222;
  --slider-bg: #dddddd;
  --slider-bg-before: #fff;
  --slider-input-bg: #8758ff;
}

[data-theme="dark"] {
  --color-bg: #000;
  --color-text: #dddddd;
  --bold-text: #eeeeee;
  --nav-text: #dddddd;
  --code: #f2f2f2;
  --block-quote-border: #8e32dc;
  --block-quote-text: #dddddd;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;💡 Note - When the data-theme="dark" is applied to the  element, the background-color of the component changes from white to black.&lt;/em&gt;&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Apply this same concept to all of the colours in your web app, and you’ve got yourself a theme switcher! What’s missing is a toggle element that, when checked, adds or removes the data-theme from the body element.&lt;/p&gt;

&lt;p&gt;Lastly, we’ll apply the rest of our toggle element’s styles as shown below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.theme-switch-wrapper {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.theme-switch {
  display: inline-block;
  height: 34px;
  position: relative;
  width: 60px;
}

.theme-switch input {
  display: none;
}

.slider {
  background-color: var(--slider-bg);
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  background-color: var(--slider-bg-before);
  bottom: 4px;
  content: "";
  height: 26px;
  left: 4px;
  position: absolute;
  transition: 0.4s;
  width: 26px;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--slider-input-bg);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.slider svg {
  color: #222;
  position: absolute;
  transition: opacity 0.2s ease 0s, transform 0.35s ease 0s;
  pointer-events: none;
}

.feather-moon {
  opacity: 0;
  left: 9px;
  bottom: 9px;
  transform: translateX(4px);
}

.feather-sun {
  opacity: 1;
  right: 10px;
  bottom: 9px;
  transform: translateX(0px);
}

input:checked + .slider .feather-moon {
  opacity: 1;
  transform: translateX(0);
}

input:checked + .slider .feather-sun {
  opacity: 0;
  transform: translateX(-4px);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;&lt;strong&gt;💡 Note - If you get stuck on picking colors for your CSS variables then discover the newest hand-picked palettes from &lt;a href="https://colorhunt.co/"&gt;Color Hunt&lt;/a&gt;.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  JavaScript
&lt;/h2&gt;

&lt;p&gt;In JavaScript, local storage is an object that is part of the window object, so we can directly access it and try to find an item that is stored inside. We use the getItem function and pass in the property we want to find inside of our &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;ThemeChange.astro component.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;script&amp;gt;
          const themeToggle = document.querySelector(
            '.theme-switch input[type="checkbox"]'
          );
          const currentTheme = localStorage.getItem("theme");
          if (currentTheme) {
            document.documentElement.setAttribute("data-theme", currentTheme);
            if (currentTheme === "dark") {
              themeToggle.checked = true;
            }
          }
          function switchTheme(e) {
            if (e.target.checked) {
              document.documentElement.setAttribute("data-theme", "dark");
              localStorage.setItem("theme", "dark");
            } else {
              document.documentElement.setAttribute("data-theme", "light");
              localStorage.setItem("theme", "light");
            }
          }
          themeToggle.addEventListener("change", switchTheme, false);

&amp;lt;/script&amp;gt;

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

&lt;/div&gt;



&lt;p&gt;Here’s the final result once all the components are in &lt;a href="https://technology-overload.netlify.app/"&gt;place&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8tw4uylsj2yeez4ximfc.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8tw4uylsj2yeez4ximfc.gif" alt="Image description" width="480" height="214"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you for reading&lt;/p&gt;

</description>
      <category>astro</category>
      <category>css</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Angular Data Binding , one Way - two Way - event Binding</title>
      <dc:creator>nour</dc:creator>
      <pubDate>Wed, 01 May 2024 22:11:22 +0000</pubDate>
      <link>https://dev.to/nourbouch/angular-data-binding-6pj</link>
      <guid>https://dev.to/nourbouch/angular-data-binding-6pj</guid>
      <description>&lt;p&gt;are u diving into Angular and feeling overwhelmed by the concept of data binding ? Data binding lies at the heart of Angular and mastering it can unlock powerful capabilities for ur website let's delve into the fundamentals and advanced techniques of Angular data binding together &lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding Data Binding in Angular:
&lt;/h2&gt;

&lt;p&gt;data binding establishes a connection between the application UI and its underlying data.. it ensures that any changes in the model state are immediately reflected in the view .. and vice versa, providing a seamless user experience..&lt;/p&gt;

&lt;h2&gt;
  
  
  Types of Data Binding:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;One-Way Data Binding:&lt;/strong&gt; this involves binding data from the component class to the template view.. changes in the component class reflect in the template but not the other way around
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;**TypeScript**
export class AppComponent {
    title = 'Welcome';
}

**HTML**
&amp;lt;h1&amp;gt;{{ title }}&amp;lt;/h1&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Two-Way Data Binding:&lt;/strong&gt; this allows data synchronization between the component class and the template .. changes in the template reflect in the component class and vice versa
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;**TypeScript**
export class AppComponent {
    name = 'Nour Bouch';
}

**HTML**
&amp;lt;input type="text" [(ngModel)]="name"&amp;gt;
&amp;lt;p&amp;gt;Hello, {{ name }}&amp;lt;/p&amp;gt;

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Advanced Data Binding Techniques:
&lt;/h2&gt;

&lt;p&gt;1.** Event Binding:** In Angular u can bind methods to events triggered by user interactions such as clicks keypresses and mouse movements.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;**HTML**
&amp;lt;button (click)="onButtonClick()"&amp;gt;Click me!&amp;lt;/button&amp;gt;

**TypeScript**
export class AppComponent {
    onButtonClick(): void {
        console.log('Button clicked!');
    }
}

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

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Property Binding:&lt;/strong&gt; This allows u to set an element's property to the value of a template expression.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;**HTML**
&amp;lt;img [src]="imageUrl"&amp;gt;

**TypeScript**
export class AppComponent {
    imageUrl = 'path/to/image.jpg';
}

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

&lt;/div&gt;



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

&lt;p&gt;learning data binding in angular is essential for building dynamic and responsive web applications. by understanding the different types of data binding and employing advanced techniques, you can create seamless user experiences and unlock the full potential of Angular development.&lt;/p&gt;

</description>
      <category>angular</category>
    </item>
    <item>
      <title>build a Simple Todo with ReactJs Angular VueJs</title>
      <dc:creator>nour</dc:creator>
      <pubDate>Wed, 01 May 2024 21:09:25 +0000</pubDate>
      <link>https://dev.to/nourbouch/building-a-simple-todoapp-with-reactjs-angular-and-vuejs-4b40</link>
      <guid>https://dev.to/nourbouch/building-a-simple-todoapp-with-reactjs-angular-and-vuejs-4b40</guid>
      <description>&lt;h2&gt;
  
  
  &lt;em&gt;Introduction&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;todoApps are a classic project for learning new frameworks and building one with Reactjs &amp;amp; Angular &amp;amp; Vue can provide valuable insights into the strengths and differences of each. in this Post we will walk through the process of creating a basic todo app with each of these popular frameworks and we'll delve into the differences between these popular frameworks and explore their strengths and use cases.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Note&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
Before you start make sure u have Nodejs and npm installed&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Creating the Project:&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  React :
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx create-react-app todo-react
cd todo-react

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Angular :
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install -g @angular/cli
ng new todo-angular
cd todo-angular

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Vue :
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install -g @vue/cli
vue create todo-vue
cd todo-vue

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Implementing the Todo List:&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  React :
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React, { useState } from 'react';
function App() {
  const [todos, setTodos] = useState([]);
  const [inputValue, setInputValue] = useState('');

  const addTodo = () =&amp;gt; {
    setTodos([...todos, inputValue]);
    setInputValue('');
  };

  const removeTodo = (index) =&amp;gt; {
    const newTodos = [...todos];
    newTodos.splice(index, 1);
    setTodos(newTodos);
  };
  return (
    &amp;lt;div&amp;gt;
      &amp;lt;input
        type="text"
        value={inputValue}
        onChange={(e) =&amp;gt; setInputValue(e.target.value)}
      /&amp;gt;
      &amp;lt;button onClick={addTodo}&amp;gt;Add&amp;lt;/button&amp;gt;
      &amp;lt;ul&amp;gt;
        {todos.map((todo, index) =&amp;gt; (
          &amp;lt;li key={index}&amp;gt;
            {todo} &amp;lt;button onClick={() =&amp;gt; removeTodo(index)}&amp;gt;Remove&amp;lt;/button&amp;gt;
          &amp;lt;/li&amp;gt;
        ))}
      &amp;lt;/ul&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}
export default App;

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Angular :
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { Component } from '@angular/core';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
  todos: string[] = [];
  inputValue: string = '';

  addTodo() {
    this.todos.push(this.inputValue);
    this.inputValue = '';
  }

  removeTodo(index: number) {
    this.todos.splice(index, 1);
  }
}

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

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;input type="text" [(ngModel)]="inputValue"&amp;gt;
&amp;lt;button (click)="addTodo()"&amp;gt;Add&amp;lt;/button&amp;gt;
&amp;lt;ul&amp;gt;
  &amp;lt;li *ngFor="let todo of todos; let i = index"&amp;gt;
    {{ todo }} &amp;lt;button (click)="removeTodo(i)"&amp;gt;Remove&amp;lt;/button&amp;gt;
  &amp;lt;/li&amp;gt;
&amp;lt;/ul&amp;gt;

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Vue :
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;template&amp;gt;
  &amp;lt;div&amp;gt;
    &amp;lt;input type="text" v-model="inputValue"&amp;gt;
    &amp;lt;button @click="addTodo"&amp;gt;Add&amp;lt;/button&amp;gt;
    &amp;lt;ul&amp;gt;
      &amp;lt;li v-for="(todo, index) in todos" :key="index"&amp;gt;
        {{ todo }} &amp;lt;button @click="removeTodo(index)"&amp;gt;Remove&amp;lt;/button&amp;gt;
      &amp;lt;/li&amp;gt;
    &amp;lt;/ul&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/template&amp;gt;

&amp;lt;script&amp;gt;
export default {
  data() {
    return {
      todos: [],
      inputValue: ''
    };
  },
  methods: {
    addTodo() {
      this.todos.push(this.inputValue);
      this.inputValue = '';
    },
    removeTodo(index) {
      this.todos.splice(index, 1);
    }
  }
}
&amp;lt;/script&amp;gt;

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Running the App :&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  React :
&lt;/h2&gt;



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

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Angular :
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm start || ng serve

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Vue :
&lt;/h2&gt;



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

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

&lt;/div&gt;



&lt;p&gt;congratulations you have successfully built a simple todo app using React &amp;amp;  Angular &amp;amp; Vue&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>angular</category>
      <category>vue</category>
      <category>react</category>
    </item>
  </channel>
</rss>
