<?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: Team Dualite</title>
    <description>The latest articles on Forem by Team Dualite (@dualite).</description>
    <link>https://forem.com/dualite</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%2F1918963%2F4f4f821a-401a-41fa-a75e-5a910a3834e0.png</url>
      <title>Forem: Team Dualite</title>
      <link>https://forem.com/dualite</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/dualite"/>
    <language>en</language>
    <item>
      <title>How to Build A Landing Page with Dualite</title>
      <dc:creator>Team Dualite</dc:creator>
      <pubDate>Thu, 12 Sep 2024 14:03:49 +0000</pubDate>
      <link>https://forem.com/dualite/how-to-build-a-landing-page-with-dualite-24dd</link>
      <guid>https://forem.com/dualite/how-to-build-a-landing-page-with-dualite-24dd</guid>
      <description>&lt;p&gt;I have spent multiple hours creating a figma design of a landing page. Every color is on point, every pixel is in place with seamless user flow, but now comes the daunting part of actually coding this landing page.&lt;/p&gt;

&lt;p&gt;Building a Figma design is a huge task to complete. That is where I got to know about Dualite which translates figma designs into actual code using AI, helping developers like me to minimize the effort of actually coding. Let’s see how i used Dualite to convert my landing page into actual code&lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  What is Dualite ?
&lt;/h3&gt;

&lt;p&gt;Dualite is an innovative AI-powered Figma plugin designed to bridge the gap between design and development. It focuses on converting Figma designs into high-quality, reusable code, with support of popular technologies such as Reactjs, TailwindCSS and more.&lt;/p&gt;

&lt;p&gt;Dualite lets you convert any figma design or animations into efficient code with a single click which you can customize according to your project, it comes with exciting features, let me give a summary about them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Modes&lt;/strong&gt;: Dualite offers two modes, Component Mode and Page Mode, ideal for developers and designers to convert their design into generated code. These modes ensure that the layout, interactivity, animations, and more are accurately translated from design to code.

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Component Mode&lt;/strong&gt;: Focuses on individual design elements, allowing for the creation of reusable components.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Page Mode&lt;/strong&gt;: Converts entire pages, maintaining the overall layout and structure.&lt;/li&gt;
&lt;li&gt;Learn more about modes on this &lt;a href="https://www.dualite.dev/blog/component-mode-and-page-mode-in-dualite-complete-explanation" rel="noopener noreferrer"&gt;blog&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Advance Features&lt;/strong&gt;: 

&lt;ul&gt;
&lt;li&gt;Dualite offers advanced settings where users can provide more technical information about their design. This ensures that the generated code is responsive and accurate.&lt;/li&gt;
&lt;li&gt;These advanced settings give more power to designers and developers, allowing them to customize the output to meet specific project requirements. This feature is particularly useful for complex designs that need precise control over the final code, such as responsive layouts or intricate animations.
To quickly get started with Dualite, you can follow their &lt;a href="https://app.gitbook.com/o/TzqMVRdkeAyYeBxsLbIJ/s/ZEJaHgFgDkhf3ua9fzff/~/changes/9/getting-started/quickstart" rel="noopener noreferrer"&gt;docs&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Figma Design
&lt;/h3&gt;

&lt;p&gt;Let’s get started with a figma design of a landing page, see below:&lt;br&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%2Fiztzzvfynbtfn4njic71.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%2Fiztzzvfynbtfn4njic71.png" alt="figma design of landing page" width="477" height="690"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, Dualite has a mode feature where you can toggle between Page Mode and Component Mode&lt;/p&gt;

&lt;p&gt;Basically, Page mode is for converting complete design in a go and Component Mode is to create separate components which we can integrate in our project, learn more about components on the &lt;a href="https://app.gitbook.com/o/TzqMVRdkeAyYeBxsLbIJ/s/ZEJaHgFgDkhf3ua9fzff/~/changes/9/basics/markdown" rel="noopener noreferrer"&gt;docs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We will be using Component Mode to generate code for all the components present in the design and then we will integrate them in a single project&lt;/p&gt;

&lt;p&gt;Let’s start by dividing landing page into components, see below:&lt;br&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%2Fhbtioifh9ihfgz3fowz9.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%2Fhbtioifh9ihfgz3fowz9.png" alt="figma design of landing page" width="800" height="607"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Initial Project Setup
&lt;/h3&gt;

&lt;p&gt;I will use Reactjs and Tailwind in Dualite to generate code, so let’s setup the project first:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reactjs App&lt;/strong&gt;: Create a react app using Vite or any other tool. Vite is a popular choice to create Javascript apps&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Setup Tailwind&lt;/strong&gt;: Follow &lt;a href="https://tailwindcss.com/docs/installation" rel="noopener noreferrer"&gt;Tailwind Docs&lt;/a&gt; to setup tailwind in a Reactjs app without any unnecessary error. Make sure to add the dependencies as well such as PostCSS and autoprefixer for a smooth Tailwind setup.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Config Files&lt;/strong&gt;: Create tailwind.config.js and postcss.config.css in the root of the project. tailwind.config.js might be present if you followed all the steps from the Tailwind docs. If it is already there then update it accordingly&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use Javascript&lt;/strong&gt;: As of now, Dualite does not support Typescript so, make sure to create Reactjs app with Javascript only&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Start Converting Components in Dualite
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Initial Setup:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Mode&lt;/strong&gt;: We will be using component mode. Use the toggle button from the top right corner to switch between Page Mode and Component Mode&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Frameworks&lt;/strong&gt;: When you select a design to convert into code, you will be seeing multiple language and frameworks options. I’ll be using Reactjs and Tailwind to generate code.&lt;/li&gt;
&lt;li&gt;To quickly getting started with using Dualite, read &lt;a href="https://app.gitbook.com/o/TzqMVRdkeAyYeBxsLbIJ/s/ZEJaHgFgDkhf3ua9fzff/~/changes/9/getting-started/quickstart" rel="noopener noreferrer"&gt;this&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now, let’s get started with converting design into component:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Announcement Bar Component: Check the generated code &lt;a href="https://codesandbox.io/p/devbox/ztn43k" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Navigation Bar Component: Check the generated code &lt;a href="https://codesandbox.io/p/devbox/7kh8mz" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Category Filter Component: Check the generated code &lt;a href="https://codesandbox.io/p/devbox/k99q85" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Card Component Component: Check the generated code &lt;a href="https://codesandbox.io/p/devbox/qhn6cs" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pagination Component: Check the generated code &lt;a href="https://codesandbox.io/p/devbox/hstqdx" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Footer Component: Check the generated code &lt;a href="https://codesandbox.io/p/devbox/v88rzz" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Customizations
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Copy Components: 

&lt;ul&gt;
&lt;li&gt;Now, copy Components folder from all the above generated code and paste it into the project in a components folder&lt;/li&gt;
&lt;li&gt;You might have noticed that all the components' names are “Component” only, so let’s name all the components accordingly. Example: Announcement bar component will be named as “AnnouncementBar”. Check how i have done it &lt;a href="https://codesandbox.io/p/github/codebysid/landing-page/main?import=true&amp;amp;layout=%257B%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522rootPanelGroup%2522%253A%257B%2522direction%2522%253A%2522horizontal%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522id%2522%253A%2522ROOT_LAYOUT%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522cm0xmky5b0006356jbl85nsgf%2522%252C%2522sizes%2522%253A%255B100%255D%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522EDITOR%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522id%2522%253A%2522cm0xmky5a0002356j6ijv2rzt%2522%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522SHELLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522id%2522%253A%2522cm0xmky5b0004356js1ydhg8b%2522%257D%255D%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522DEVTOOLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522id%2522%253A%2522cm0xmky5b0005356js2slu0f4%2522%257D%255D%257D%255D%252C%2522sizes%2522%253A%255B50%252C50%255D%257D%252C%2522tabbedPanels%2522%253A%257B%2522cm0xmky5a0002356j6ijv2rzt%2522%253A%257B%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522cm0xmky5a0001356j607xkmgv%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522FILE%2522%252C%2522filepath%2522%253A%2522%252FREADME.md%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%255D%252C%2522id%2522%253A%2522cm0xmky5a0002356j6ijv2rzt%2522%252C%2522activeTabId%2522%253A%2522cm0xmky5a0001356j607xkmgv%2522%257D%252C%2522cm0xmky5b0005356js2slu0f4%2522%253A%257B%2522id%2522%253A%2522cm0xmky5b0005356js2slu0f4%2522%252C%2522activeTabId%2522%253A%2522cm0xmnykc001s356jdr7m689f%2522%252C%2522tabs%2522%253A%255B%257B%2522type%2522%253A%2522SETUP_TASKS%2522%252C%2522id%2522%253A%2522cm0xmkztm000d356j9txndk0j%2522%252C%2522mode%2522%253A%2522permanent%2522%257D%252C%257B%2522type%2522%253A%2522ENV_SETUP%2522%252C%2522id%2522%253A%2522cm0xmmd0g0004356j1fz7q7av%2522%252C%2522mode%2522%253A%2522permanent%2522%257D%252C%257B%2522type%2522%253A%2522TASK_PORT%2522%252C%2522port%2522%253A5173%252C%2522taskId%2522%253A%2522dev%2522%252C%2522id%2522%253A%2522cm0xmnykc001s356jdr7m689f%2522%252C%2522mode%2522%253A%2522permanent%2522%257D%255D%257D%252C%2522cm0xmky5b0004356js1ydhg8b%2522%253A%257B%2522id%2522%253A%2522cm0xmky5b0004356js1ydhg8b%2522%252C%2522activeTabId%2522%253A%2522cm0xml2d2000k356jxd6ga1ja%2522%252C%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522cm0xmky5b0003356jaqa9bl3k%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522NEW_TERMINAL%2522%257D%252C%257B%2522type%2522%253A%2522TASK_LOG%2522%252C%2522taskId%2522%253A%2522dev%2522%252C%2522id%2522%253A%2522cm0xml2d2000k356jxd6ga1ja%2522%252C%2522mode%2522%253A%2522permanent%2522%257D%255D%257D%257D%252C%2522showDevtools%2522%253Atrue%252C%2522showShells%2522%253Atrue%252C%2522showSidebar%2522%253Atrue%252C%2522sidebarPanelSize%2522%253A15%257D" rel="noopener noreferrer"&gt;here&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Render all Components:

&lt;ul&gt;
&lt;li&gt;Now, import all the components according to the design inside App.jsx file&lt;/li&gt;
&lt;li&gt;Run the project and you will see the output,check the App.jsx file &lt;a href="https://codesandbox.io/p/github/codebysid/landing-page/main?import=true&amp;amp;layout=%257B%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522rootPanelGroup%2522%253A%257B%2522direction%2522%253A%2522horizontal%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522id%2522%253A%2522ROOT_LAYOUT%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522cm0xmky5b0006356jbl85nsgf%2522%252C%2522sizes%2522%253A%255B100%255D%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522EDITOR%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522id%2522%253A%2522cm0xmky5a0002356j6ijv2rzt%2522%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522SHELLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522id%2522%253A%2522cm0xmky5b0004356js1ydhg8b%2522%257D%255D%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522DEVTOOLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522id%2522%253A%2522cm0xmky5b0005356js2slu0f4%2522%257D%255D%257D%255D%252C%2522sizes%2522%253A%255B50%252C50%255D%257D%252C%2522tabbedPanels%2522%253A%257B%2522cm0xmky5a0002356j6ijv2rzt%2522%253A%257B%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522cm0xmky5a0001356j607xkmgv%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522FILE%2522%252C%2522filepath%2522%253A%2522%252FREADME.md%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%255D%252C%2522id%2522%253A%2522cm0xmky5a0002356j6ijv2rzt%2522%252C%2522activeTabId%2522%253A%2522cm0xmky5a0001356j607xkmgv%2522%257D%252C%2522cm0xmky5b0005356js2slu0f4%2522%253A%257B%2522id%2522%253A%2522cm0xmky5b0005356js2slu0f4%2522%252C%2522activeTabId%2522%253A%2522cm0xmnykc001s356jdr7m689f%2522%252C%2522tabs%2522%253A%255B%257B%2522type%2522%253A%2522SETUP_TASKS%2522%252C%2522id%2522%253A%2522cm0xmkztm000d356j9txndk0j%2522%252C%2522mode%2522%253A%2522permanent%2522%257D%252C%257B%2522type%2522%253A%2522ENV_SETUP%2522%252C%2522id%2522%253A%2522cm0xmmd0g0004356j1fz7q7av%2522%252C%2522mode%2522%253A%2522permanent%2522%257D%252C%257B%2522type%2522%253A%2522TASK_PORT%2522%252C%2522port%2522%253A5173%252C%2522taskId%2522%253A%2522dev%2522%252C%2522id%2522%253A%2522cm0xmnykc001s356jdr7m689f%2522%252C%2522mode%2522%253A%2522permanent%2522%257D%255D%257D%252C%2522cm0xmky5b0004356js1ydhg8b%2522%253A%257B%2522id%2522%253A%2522cm0xmky5b0004356js1ydhg8b%2522%252C%2522activeTabId%2522%253A%2522cm0xml2d2000k356jxd6ga1ja%2522%252C%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522cm0xmky5b0003356jaqa9bl3k%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522NEW_TERMINAL%2522%257D%252C%257B%2522type%2522%253A%2522TASK_LOG%2522%252C%2522taskId%2522%253A%2522dev%2522%252C%2522id%2522%253A%2522cm0xml2d2000k356jxd6ga1ja%2522%252C%2522mode%2522%253A%2522permanent%2522%257D%255D%257D%257D%252C%2522showDevtools%2522%253Atrue%252C%2522showShells%2522%253Atrue%252C%2522showSidebar%2522%253Atrue%252C%2522sidebarPanelSize%2522%253A15%257D" rel="noopener noreferrer"&gt;here&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;You might have noticed, some components need to be fixed. Let’s start with the customizations&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Fixing Component Styles:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fonts&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;As you can see in the design, we have our own Fonts. Adding them inside the assets folders so i can use the font in the project anywhere.&lt;/li&gt;
&lt;li&gt;Also needs to create &lt;code&gt;@font-face&lt;/code&gt; for the all the fonts we are using in index.css file where Tailwind directives are present&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Navigation Bar Component&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Layout is inaccurate so, style needs to be fixed&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Card Component&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Star Icon&lt;/strong&gt;: Added star icon’s inside graphics folder &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Text.js&lt;/strong&gt;: Updated Text.js file to fix the button label and other text of the component&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Styles&lt;/strong&gt;: Updated styles to add font weight to specific text element and button label&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Card Component Logic&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Card Component renders only a single component because it is a single component only. &lt;/li&gt;
&lt;li&gt;To render multiple Card Component, i have to add some demo data to map over it and render multiple Cards&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Note: All the changes and the code can be seen on CodeSandBox &lt;a href="https://codesandbox.io/p/github/codebysid/landing-page/main?import=true&amp;amp;layout=%257B%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522rootPanelGroup%2522%253A%257B%2522direction%2522%253A%2522horizontal%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522id%2522%253A%2522ROOT_LAYOUT%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522cm0xmky5b0006356jbl85nsgf%2522%252C%2522sizes%2522%253A%255B100%255D%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522EDITOR%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522id%2522%253A%2522cm0xmky5a0002356j6ijv2rzt%2522%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522SHELLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522id%2522%253A%2522cm0xmky5b0004356js1ydhg8b%2522%257D%255D%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522DEVTOOLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522id%2522%253A%2522cm0xmky5b0005356js2slu0f4%2522%257D%255D%257D%255D%252C%2522sizes%2522%253A%255B50%252C50%255D%257D%252C%2522tabbedPanels%2522%253A%257B%2522cm0xmky5a0002356j6ijv2rzt%2522%253A%257B%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522cm0xmky5a0001356j607xkmgv%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522FILE%2522%252C%2522filepath%2522%253A%2522%252FREADME.md%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%255D%252C%2522id%2522%253A%2522cm0xmky5a0002356j6ijv2rzt%2522%252C%2522activeTabId%2522%253A%2522cm0xmky5a0001356j607xkmgv%2522%257D%252C%2522cm0xmky5b0005356js2slu0f4%2522%253A%257B%2522id%2522%253A%2522cm0xmky5b0005356js2slu0f4%2522%252C%2522activeTabId%2522%253A%2522cm0xmnykc001s356jdr7m689f%2522%252C%2522tabs%2522%253A%255B%257B%2522type%2522%253A%2522SETUP_TASKS%2522%252C%2522id%2522%253A%2522cm0xmkztm000d356j9txndk0j%2522%252C%2522mode%2522%253A%2522permanent%2522%257D%252C%257B%2522type%2522%253A%2522ENV_SETUP%2522%252C%2522id%2522%253A%2522cm0xmmd0g0004356j1fz7q7av%2522%252C%2522mode%2522%253A%2522permanent%2522%257D%252C%257B%2522type%2522%253A%2522TASK_PORT%2522%252C%2522port%2522%253A5173%252C%2522taskId%2522%253A%2522dev%2522%252C%2522id%2522%253A%2522cm0xmnykc001s356jdr7m689f%2522%252C%2522mode%2522%253A%2522permanent%2522%257D%255D%257D%252C%2522cm0xmky5b0004356js1ydhg8b%2522%253A%257B%2522id%2522%253A%2522cm0xmky5b0004356js1ydhg8b%2522%252C%2522activeTabId%2522%253A%2522cm0xml2d2000k356jxd6ga1ja%2522%252C%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522cm0xmky5b0003356jaqa9bl3k%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522NEW_TERMINAL%2522%257D%252C%257B%2522type%2522%253A%2522TASK_LOG%2522%252C%2522taskId%2522%253A%2522dev%2522%252C%2522id%2522%253A%2522cm0xml2d2000k356jxd6ga1ja%2522%252C%2522mode%2522%253A%2522permanent%2522%257D%255D%257D%257D%252C%2522showDevtools%2522%253Atrue%252C%2522showShells%2522%253Atrue%252C%2522showSidebar%2522%253Atrue%252C%2522sidebarPanelSize%2522%253A15%257D" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Output
&lt;/h3&gt;

&lt;p&gt;As soon as I made all these customizations and changes in the project, I can see a better version of my design, check the code and output here&lt;/p&gt;

&lt;h3&gt;
  
  
  Was Dualite helpful ?
&lt;/h3&gt;

&lt;p&gt;Let’s understand it properly, all the components we generated using Dualite were ready to use, yes, we made some customizations into the code to make it as close as the design looks, despite that, all the styles of the components, all the hierarchy of the components with the data in separate files get generated by Dualite.&lt;/p&gt;

&lt;p&gt;Instead of spending too much time building the UI, I can use Dualite for that. &lt;/p&gt;

&lt;p&gt;Comparing it to manual coding, this would have taken a long enough time. All the components output was really good, nothing can be 100% correct, every code needs a final touch by the developer and that's what we did here&lt;/p&gt;

&lt;p&gt;Yes, Dualite was very helpful and fast in generating code for my components. &lt;/p&gt;

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

&lt;p&gt;There you have it, an efficient way to generate code of your Figma designs with very less manual coding. Process of actually coding the designs is a whole roller coaster ride, which can be less complicated if you use Dualite and customize the code according to your needs and the project.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>frontend</category>
      <category>developer</category>
      <category>javascript</category>
    </item>
    <item>
      <title>The Ultimate Guide to Web Optimizations</title>
      <dc:creator>Team Dualite</dc:creator>
      <pubDate>Mon, 09 Sep 2024 11:15:01 +0000</pubDate>
      <link>https://forem.com/dualite/the-ultimate-guide-to-web-optimizations-2eki</link>
      <guid>https://forem.com/dualite/the-ultimate-guide-to-web-optimizations-2eki</guid>
      <description>&lt;p&gt;Getting your website to load faster and perform better isn’t just about making it pretty. It’s about keeping your users happy and engaged. Here’s a guide that dives into practical web optimization techniques, from the basics to more advanced methods. Let’s get started!&lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  1. &lt;strong&gt;Start with PageSpeed Insights&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Before you make any changes, you need to know where your site stands. You can use &lt;a href="https://pagespeed.web.dev/" rel="noopener noreferrer"&gt;PageSpeed Insights&lt;/a&gt; to get a score and detailed advice on what to fix&lt;br&gt;
 &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Focus on Your LCP, FID, and CLS Scores&lt;/strong&gt;: These are some core web metrics that show how quickly your site loads, responds, and stays stable. Improving all this will give you a great start. Learn more about Web Core Vital &lt;a href="https://www.cloudflare.com/learning/performance/what-are-core-web-vitals/" rel="noopener noreferrer"&gt;here&lt;/a&gt;
 &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Optimize Image Delivery&lt;/strong&gt;: Consider using modern formats like WebP or optimizing image sizes directly from the recommendations in PageSpeed Insights. It helps in reducing load time and optimizing the site to a good level. You can also use popular tools like &lt;a href="https://convertio.co/png-webp/" rel="noopener noreferrer"&gt;Convertio &lt;/a&gt;to convert your png images to webp format.
 &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. &lt;strong&gt;Lazy Loading&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Lazy loading means you load different elements when they are needed. It can significantly speed up your initial page load and overall site.&lt;br&gt;
 &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Add loading="lazy"&lt;/strong&gt;: The loading attribute specifies whether a browser should load an image immediately or to defer loading of off-screen images until. For example: the user scrolls near them.
 &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Consider Intersection Observer&lt;/strong&gt;: The Intersection Observer API provides a way to asynchronously observe changes in the intersection of a target element with an ancestor element or with a top-level document's viewport. For more control and flexibility, use the JavaScript Intersection Observer API with lazy loading images or any component to optimize it further
 &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lazy Loading Elements&lt;/strong&gt;:  You can also implement Lazy Loading for all the elements or components. For example: Using React.lazy() and React.Suspense to lazy load the heavy or asynchronous components
 &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. &lt;strong&gt;Manage Third-Party Scripts&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Third-party scripts can be a massive drag on performance if left unchecked. Here's how to keep them under control:&lt;br&gt;
 &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Audit and Prioritize&lt;/strong&gt;: Use tools like &lt;a href="https://www.seoptimer.com/" rel="noopener noreferrer"&gt;SEOptimer &lt;/a&gt;to analyze which third-party scripts are slowing you down. Decide which ones are critical and remove the rest which are not necessary.
 &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Load Asynchronously&lt;/strong&gt;: For non-essential scripts, use async or defer attributes to load them without blocking the main content.
 &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Consider Lazy Loading&lt;/strong&gt;: Just like images, you can lazy load third-party scripts that aren't immediately needed on page load eventually improving the load time of the scripts.
 &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monitor Performance Regularly&lt;/strong&gt;: Set up regular performance checks to see how these scripts impact your loading speed over time. Monitoring and fixing what is required will give your site a powerful boost
 &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. &lt;strong&gt;Leverage a CDN (Content Delivery Network)&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;A CDN, or content delivery network, is a group of servers that work together to speed up how quickly webpages load which you can use to serve your content closer to your users, reducing latency and speed up load times.&lt;br&gt;
 &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Choose the Right CDN&lt;/strong&gt;: Not all &lt;a href="https://www.digitalocean.com/community/questions/which-cdn-to-use" rel="noopener noreferrer"&gt;CDNs &lt;/a&gt;are created equal, look for ones that offer features like dynamic content caching and global server presence according to your site and use case. Learn more about selecting 
 &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cache Static Content&lt;/strong&gt;: Make sure to cache static files like images, CSS, and JavaScript files on the CDN for faster delivery.
 &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Optimize Cache Invalidation&lt;/strong&gt;: If you update content frequently, ensure that your CDN has a smart cache invalidation strategy to serve the most recent content or adding cache control headers and keys will help you to optimize it.
 &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  5. &lt;strong&gt;Caching&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Caching is a process that stores copies of data in a temporary storage location, or cache, to make it faster to access. It can significantly speed up repeated visits or accessing some information again and again.&lt;br&gt;
 &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Types of Caching&lt;/strong&gt;: Use browser, server-side, and CDN caching which we have already discussed to store static files and frequently requested data closer to users as possible for faster access.
  &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Control with Headers&lt;/strong&gt;: Use Cache-Control and Expires headers to manage how long files stay in cache and when they need refreshing. This is basically to keep cache free from expired or unused data.
 &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Database Caching&lt;/strong&gt;: Utilize in-memory stores like Redis to cache frequent database queries, reducing server load and speeding up responses, improving User Experience to a great extent.
 &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  6. &lt;strong&gt;Reduce Main Thread Work&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The main thread is responsible for handling rendering elements, user interactions and basically most of the site operations, so if it is busy, your site feels slow and laggy.&lt;br&gt;
 &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Analyze with Chrome DevTools&lt;/strong&gt;: Use DevTools to see which tasks are hogging the main thread. Break down large scripts into smaller chunks to optimize performance.
 &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Move Heavy Calculations to Web Workers&lt;/strong&gt;: Offload heavy computations to Web Workers, freeing up the main thread for user interactions. A web worker is a JavaScript application running in the background, without affecting the performance of the page.
 &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Optimize Event Listeners&lt;/strong&gt;: Reduce the number of event listeners, especially those attached to scroll, resize, or mousemove events, which can be particularly heavy and make sure to remove the event listeners as well, to minimize the load from the thread.
 &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  7. &lt;strong&gt;Optimize Font Loading&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Fonts are essential for your website’s aesthetics and feel, but they can also cause delays in rendering elements if not configured properly.&lt;br&gt;
 &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Use font-display&lt;/strong&gt;: Font- display property is used inside @font-face rule of CSS. Basically, you can configure which font to display if the custom font is not loaded. The default behavior is to show nothing to the user until the custom font loads. Learn more &lt;a href="https://css-tricks.com/almanac/properties/f/font-display/" rel="noopener noreferrer"&gt;here&lt;/a&gt;
 &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Preload Important Fonts&lt;/strong&gt;: Preloading critical fonts asynchronously, ensuring faster load of the fonts, improving the user experience and user accessibility.
 &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use the correct font file extension&lt;/strong&gt;: The size of the font file can be affected by the font file extension. For example, the WOFF2 font file format is smaller than Woff, like a small size font will eventually loads faster than a large size font
 &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use a fallback font&lt;/strong&gt;: Providing a fallback font is necessary because if somehow the original used font is not loaded due to browser compatibility or weak internet issue then the fallback font will be applied ensuring user can still view and use it
 &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  8. &lt;strong&gt;Minify and Compress Your Code&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Minification refers to compressing or reducing code file sizes written in JavaScript, CSS or any other language, so these files can load quickly&lt;br&gt;
 &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Minify All Assets&lt;/strong&gt;: Removing all unnecessary characters (like spaces and comments) and unnecessary code from HTML, CSS, JavaScript, images and all files which are public or pushed to server, will eventually helps to decrease the bundle size of the site
 &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep Code Clean and Lean&lt;/strong&gt;: Beyond minification, regularly refactor your code to keep it efficient and easy to maintain by implementing a proper architecture, maintaining event listeners, reducing number of variables and using correct algorithms for all operations.
 &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  9. &lt;strong&gt;Use Modern Image Formats&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;New image formats like WebP and AVIF offer better quality at smaller file sizes, which is a win-win for performance.&lt;br&gt;
 &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Convert Images to WebP or AVIF&lt;/strong&gt;: These formats provide much better compression rates than JPEG or PNG, and also maintain the quality of the image
 &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement Lazy Loading for Images&lt;/strong&gt;: Combine modern formats with lazy loading for maximum performance gains which we have already discussed under Lazy Loading point
 &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Provide Fallbacks&lt;/strong&gt;: All the browsers don't support newer formats and to resolve this compatibility issue you can have fallbacks in place to ensure a smooth experience. Fallback can be anything like another image or simply the alt text present in the alt attribute of the image tag
 &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  10. &lt;strong&gt;Rendering Strategies for Web Optimization&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Optimizing how your website renders content can significantly impact performance, user experience, and SEO. Two primary rendering strategies are Client-Side Rendering (CSR) and Server-Side Rendering (SSR). Here’s how each affects web optimization:&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Client-Side Rendering (CSR)&lt;/strong&gt;&lt;br&gt;
 &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CSR uses JavaScript to generate a web page’s user interface and HTML on the user browser itself. This approach has a few optimization implications:
 &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Minimizes Server Workload&lt;/strong&gt;: Since rendering happens in the user’s browser, server load is reduced, which optimizes server performance and scalability.
 &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Improves Interactivity and Performance&lt;/strong&gt;: CSR allows for faster, more dynamic interactions, as users don’t need to reload the entire page to update content.
 &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Delays First Contentful Paint (FCP)&lt;/strong&gt;: CSR can delay the initial page load, impacting user experience and SEO if not handled carefully e.g by using techniques like code splitting and lazy loading which we have discussed above and you can read more about it &lt;a href="https://www.dualite.dev/blog/lazy-loading-in-reactjs-a-developer-guide" rel="noopener noreferrer"&gt;here&lt;/a&gt;
 &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Server-Side Rendering (SSR)&lt;/strong&gt;&lt;br&gt;
 &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SSR renders the page content on the server and delivers a fully formed HTML page to the user’s browser to render. This approach can enhance performance and SEO in several ways:
 &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Boosts Initial Load Speed&lt;/strong&gt;: Users see the content faster because servers are comparatively faster than the browsers while generating HTML, which improves performance and can reduce bounce rates as well.
 &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enhances SEO&lt;/strong&gt;: Search engines can easily crawl and index pre-rendered content which eventually improves visibility and rankings, especially for content driven websites.
 &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Balanced Server Load&lt;/strong&gt;: While it offers faster initial loads, SSR increases the server workload because now the server is generating all the HTML and will require optimization techniques like caching to manage server resources effectively.
 &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Balancing CSR and SSR, or using a hybrid approach, can help you achieve the best optimization for both performance and SEO, depending on your website's specific needs.&lt;br&gt;
 &lt;/p&gt;

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

&lt;p&gt;Optimizing a website isn’t about doing one thing but it’s about a combination of strategies that, together, make a big difference. Some fixes are easy, like lazy loading images or optimizing cache headers. Others, like managing third-party scripts or reducing main thread work, take a bit more effort but offer significant gains. Start with the low-hanging fruit and move towards more advanced optimizations as you go. Remember, a faster site isn’t just better for users but it’s better for business too.&lt;br&gt;
 &lt;/p&gt;

&lt;p&gt;For more, check Dualite's official website &lt;a href="https://www.dualite.dev/" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>seo</category>
      <category>development</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Micro Frontend Architecture for Developers</title>
      <dc:creator>Team Dualite</dc:creator>
      <pubDate>Mon, 09 Sep 2024 09:50:23 +0000</pubDate>
      <link>https://forem.com/dualite/micro-frontend-architecture-for-developers-c9a</link>
      <guid>https://forem.com/dualite/micro-frontend-architecture-for-developers-c9a</guid>
      <description>&lt;p&gt;Micro frontend architecture is an innovative approach to frontend development that brings the benefits of microservices to the browser. If you’re dealing with a large-scale application or looking for ways to make your frontend codebase more maintainable and scalable, micro frontends could be the answer. Let’s dive deep into this architecture, understand its core principles, benefits, challenges, and how to implement it in your projects.&lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  What is Micro Frontend Architecture?
&lt;/h3&gt;

&lt;p&gt;Micro frontend architecture involves breaking down a monolithic frontend application into smaller, independent, and self-contained pieces, similar to how microservices are used in backend development. Each piece, known as a micro frontend, is owned by a team that can develop, deploy, and manage it independently of the others. The goal is to make the development process more flexible and modular, allowing teams to work on different features or sections of the frontend concurrently.&lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  Core Principles of Micro Frontend Architecture
&lt;/h3&gt;

&lt;p&gt; &lt;br&gt;
    1. &lt;strong&gt;Independence&lt;/strong&gt;: Each micro frontend should be an independent unit that can be developed, deployed, and maintained in isolation. This means you can use different frameworks, libraries, or even technologies if needed.&lt;br&gt;
 &lt;br&gt;
    2. &lt;strong&gt;Single Responsibility&lt;/strong&gt;: Each micro frontend should focus on a specific business function or feature, such as user authentication, product listing, or checkout.&lt;br&gt;
 &lt;br&gt;
    3. &lt;strong&gt;Team Autonomy&lt;/strong&gt;: Teams should have the freedom to choose their tech stack and tools based on the needs of their micro frontend. This leads to faster development cycles and more innovative solutions.&lt;br&gt;
 &lt;br&gt;
    4. &lt;strong&gt;Composability&lt;/strong&gt;: The final application is composed of multiple micro frontends. Each micro frontend should be designed to be easily integrated with others.&lt;br&gt;
 &lt;br&gt;
    5. &lt;strong&gt;Scalability&lt;/strong&gt;: Micro frontends allow scaling teams and codebases horizontally. You can have multiple teams working on different micro frontends without interfering with each other.&lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  Benefits of Micro Frontend Architecture
&lt;/h3&gt;

&lt;p&gt; &lt;br&gt;
    1. &lt;strong&gt;Independent Deployments&lt;/strong&gt;: Since micro frontends are separate units, they can be deployed independently. This reduces the risk of deploying a large monolithic frontend where a small change could break the entire application.&lt;br&gt;
 &lt;br&gt;
    2. &lt;strong&gt;Technology Agnostic&lt;/strong&gt;: Teams can choose the technology stack that best suits their needs. For example, one team could use React, while another uses Vue or Svelte.&lt;br&gt;
 &lt;br&gt;
    3. &lt;strong&gt;Faster Development and Releases&lt;/strong&gt;: Autonomous teams can develop and release features faster without waiting for other teams, continuous deployment pipelines can be set up for each micro frontend.&lt;br&gt;
 &lt;br&gt;
    4. &lt;strong&gt;Scalable and Maintainable Codebase&lt;/strong&gt;: A large codebase is easier to manage when divided into smaller, more focused parts. It also reduces cognitive load, making it easier for new developers to onboard and contribute effectively.&lt;br&gt;
 &lt;br&gt;
    5. &lt;strong&gt;Reusability&lt;/strong&gt;: Components developed as micro frontends can be reused across different applications which eventually saves time and effort of the team.&lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  Challenges of Micro Frontend Architecture
&lt;/h3&gt;

&lt;p&gt; &lt;br&gt;
    While micro frontends offer several advantages, they also come with their own set of challenges:&lt;br&gt;
    1. &lt;strong&gt;Complexity in Integration&lt;/strong&gt;: Integrating multiple micro frontends into a single, seamless user experience can be challenging. You need to carefully manage routing, state, components, testing etc in a way which makes sure it's scalable and maintainable.&lt;br&gt;
 &lt;br&gt;
    2. &lt;strong&gt;Performance Overhead&lt;/strong&gt;: Loading multiple micro frontends can introduce performance issues. You need to ensure that micro frontends are optimized for performance to avoid slow page loads and other unnecessary  operations which affect the performance in a bad way.&lt;br&gt;
 &lt;br&gt;
    3. &lt;strong&gt;Consistent UI/UX&lt;/strong&gt;: Ensuring a consistent look and feel across micro frontends developed by different teams is crucial, because there are multiple teams working with different tech stacks then maintaining the design consistency becomes a crucial task. You can use design systems and shared component libraries which helps in maintaining consistency.&lt;br&gt;
 &lt;br&gt;
    4. &lt;strong&gt;Communication Between Micro Frontends&lt;/strong&gt;: Sharing data and communicating between micro frontends can be challenging due to multiple micro frontends built on different technologies. You need to establish patterns for data fetching, event handling, and state management to ensure consistent communication between all micro frontends.&lt;br&gt;
 &lt;br&gt;
    5. &lt;strong&gt;Increased Setup and Maintenance Costs&lt;/strong&gt;: Setting up a micro frontend architecture requires more initial effort in terms of infrastructure, CI/CD pipelines, and development practices. Maintenance can also become more complex if not managed well.&lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  Implementing Micro Frontend Architecture
&lt;/h3&gt;

&lt;p&gt; &lt;br&gt;
    1. &lt;strong&gt;Build and Deployment Strategy&lt;/strong&gt;&lt;br&gt;
    A robust build and deployment strategy is crucial for micro frontends. Each micro frontend should have its own repository, CI/CD pipeline, and build process. You can use tools like Webpack Module Federation, Single-SPA, or Bit to build and manage micro frontends. These tools allow you to create shared modules and handle dependency management effectively.&lt;br&gt;
 &lt;br&gt;
    2. &lt;strong&gt;Routing Management&lt;/strong&gt;&lt;br&gt;
    For seamless integration, routing is essential to implement. Libraries like Single-SPA provide solutions for handling multiple frameworks on a single page. You can also use Module Federation for a more advanced approach where micro frontends share code.&lt;br&gt;
 &lt;br&gt;
    3. &lt;strong&gt;Communication Between Micro Frontends&lt;/strong&gt;&lt;br&gt;
    While each micro frontend should be self-contained, there may be times when they need to communicate. Use event-driven architectures, shared state management libraries like Redux, or custom solutions for cross-micro frontend communication.&lt;br&gt;
 &lt;br&gt;
    4. &lt;strong&gt;State Management&lt;/strong&gt;&lt;br&gt;
    Managing state in a micro frontend setup can be tricky. You can use a shared state management library like Redux, Recoil, or Zustand to manage global state, or go for more decoupled approaches using custom event buses or Pub/Sub models.&lt;br&gt;
 &lt;br&gt;
    5. &lt;strong&gt;Consistent Design System&lt;/strong&gt;&lt;br&gt;
    Having a consistent design system is vital. Establish a shared design system or component library that each team can consume. Tools like Storybook and Bit help in building and sharing components across teams.&lt;br&gt;
 &lt;br&gt;
    6. &lt;strong&gt;Testing Micro Frontends&lt;/strong&gt;&lt;br&gt;
    Testing strategies in a micro frontend architecture involve both isolated tests for each micro frontend and integration tests for the entire application. Use tools like Jest, Cypress, and Pact for unit, integration, and contract testing.&lt;br&gt;
 &lt;br&gt;
    7. &lt;strong&gt;Composition&lt;/strong&gt;&lt;br&gt;
 &lt;br&gt;
Build-time composition involves assembling the various micro frontends into a single bundle during the build process. This approach requires careful coordination and adherence to shared design principles and contracts.&lt;br&gt;
 &lt;br&gt;
Runtime composition involves loading and integrating micro frontends dynamically during runtime. This approach offers greater flexibility and allows for on-demand loading, reducing initial load times and enabling independent updates of individual components.&lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  Tools and Frameworks for Micro Frontend Architecture
&lt;/h3&gt;

&lt;p&gt; &lt;br&gt;
    1. &lt;strong&gt;Single-SPA&lt;/strong&gt;: A popular framework for building micro frontends that work together, regardless of their framework.&lt;br&gt;
 &lt;br&gt;
    2. &lt;strong&gt;Module Federation (Webpack 5)&lt;/strong&gt;: Allows micro frontends to share code and dependencies, reducing duplication and improving load times.&lt;br&gt;
 &lt;br&gt;
    3. &lt;strong&gt;Bit&lt;/strong&gt;: Provides a platform for building and sharing components, enabling collaboration across teams.&lt;br&gt;
 &lt;br&gt;
    4. &lt;strong&gt;Qiankun&lt;/strong&gt;: A micro frontend framework that focuses on being simple and easy to use, built on top of Single-SPA.&lt;br&gt;
 &lt;br&gt;
    5. &lt;strong&gt;Piral&lt;/strong&gt;: A framework for next-generation portal applications that supports micro frontend architecture out of the box.&lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  Best Practices for Implementing Micro Frontends
&lt;/h3&gt;

&lt;p&gt; &lt;br&gt;
    1. &lt;strong&gt;Start Small&lt;/strong&gt;: If you’re new to micro frontends, start by breaking a small part of your application into micro frontends and iterate from there, start from small, learn and understand the architecture then expand it more.&lt;br&gt;
 &lt;br&gt;
    2. &lt;strong&gt;Ensure Isolation&lt;/strong&gt;: Each micro frontend should be as independent as possible to reduce the needs for cross frontend communication. One of the only principles of micro frontend is to build micro frontends separately.&lt;br&gt;
 &lt;br&gt;
    3. &lt;strong&gt;Focus on Developer Experience&lt;/strong&gt;: Developers must be familiar and comfortable with the architecture, also provide guidelines, share tooling, and libraries to make it easier for teams to build, test, and deploy micro frontends effectively.&lt;br&gt;
 &lt;br&gt;
    4. &lt;strong&gt;Maintain Consistent Documentation&lt;/strong&gt;: Keep all micro frontend documentation up-to-date to ensure smooth onboarding and collaboration between teams. Good written documentation also works as a true source of information for the new developer.&lt;br&gt;
 &lt;/p&gt;

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

&lt;p&gt; &lt;br&gt;
Micro frontend architecture is a powerful paradigm for building scalable, maintainable, and modular frontend applications. However, it requires careful planning, clear guidelines, and a solid infrastructure to be successful. As a developer, it opens up a world of possibilities to work independently, experiment with new technologies, and deliver value faster. Start small, learn iteratively, and embrace the flexibility that micro frontends offer for the organization and the developer as well.&lt;/p&gt;

&lt;p&gt;Do visit Dualite, an AI Powered Figma-to-Code Extension &lt;a href="https://www.dualite.dev/" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>frontend</category>
      <category>architecture</category>
      <category>developers</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Lazy Loading in ReactJS: A Developer Guide</title>
      <dc:creator>Team Dualite</dc:creator>
      <pubDate>Wed, 04 Sep 2024 13:15:07 +0000</pubDate>
      <link>https://forem.com/dualite/lazy-loading-in-reactjs-a-developer-guide-21b3</link>
      <guid>https://forem.com/dualite/lazy-loading-in-reactjs-a-developer-guide-21b3</guid>
      <description>&lt;p&gt;Lazy loading is a powerful technique in ReactJS that allows components or elements to be loaded only when they are needed, which enhances the performance of a web application. In this article, we will explore the concept of lazy loading, its benefits, and how to implement it in a React application using the built-in &lt;strong&gt;React.lazy()&lt;/strong&gt; and &lt;strong&gt;React.Suspense&lt;/strong&gt; features.&lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  What is Lazy Loading?
&lt;/h3&gt;

&lt;p&gt;Lazy loading is a technique commonly used in web development to delay the loading of non-critical resources at the initial load time. This means that resources like images, components, or routes are loaded on demand rather than all at once, which can drastically reduce the initial loading time and enhance the user experience&lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  Benefits of Lazy Loading
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Performance Optimization&lt;/strong&gt;: By splitting large bundles into smaller chunks and loading them on demand, lazy loading significantly reduces the initial loading time and the overall load time of the application.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reduced Bandwidth Consumption&lt;/strong&gt;: Resources are only loaded when required, which conserves bandwidth and is particularly useful for users with slower network connections.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Improved User Experience&lt;/strong&gt;: By displaying content faster and reducing the time to the first meaningful paint, users experience quicker navigation and interaction.
 &lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Implementing Lazy Loading in React
&lt;/h3&gt;

&lt;p&gt;React provides built-in support for lazy loading through the React.lazy() function and the React.Suspense component. These features make it easy to implement code splitting and load components dynamically.&lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  Using &lt;strong&gt;React.lazy()&lt;/strong&gt; and &lt;strong&gt;React.Suspense&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;React.lazy()&lt;/strong&gt; is a function that lets you render a dynamic import as a regular component. This function takes a function that returns a dynamic import (a promise that resolves to a module containing a default export) and returns a React component.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;React.Suspense&lt;/strong&gt; is a component that allows you to define a fallback UI that will be displayed while the lazy-loaded component is being fetched. You can use it at any hierarchy level, making it flexible for loading multiple components lazily.&lt;/li&gt;
&lt;li&gt;The fallback prop of Suspense takes a React element, which acts as a placeholder content. It can be a loading spinner, a progress bar, or any other React component you want to show while loading.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, consider a simple Home component where we want to lazily load an About component:&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%2F35dja7y8a527tazee3k0.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%2F35dja7y8a527tazee3k0.png" alt="lazy loading in reactjs"&gt;&lt;/a&gt;&lt;br&gt;
In this example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;React.lazy() is used to dynamically import the About component&lt;/li&gt;
&lt;li&gt;React.Suspense is wrapped around the lazy component and uses a fallback prop to specify a loading indicator (e.g., a spinner or a simple text) while the component is being loaded.
 &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Error Handling with Lazy Loaded Components
&lt;/h3&gt;

&lt;p&gt;When dealing with lazy-loaded components, there’s always a possibility that the loading process could fail due to network issues or other errors. To enhance the user experience in such cases, you can use an error boundary to catch errors and display a custom error message. Here’s an example:&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%2Fsxvzgwwwn3lxhelmrj4a.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%2Fsxvzgwwwn3lxhelmrj4a.png" alt="error boundary in reactjs"&gt;&lt;/a&gt;&lt;br&gt;
By wrapping the Suspense component with an &lt;strong&gt;ErrorBoundary Component&lt;/strong&gt;, you ensure that any loading errors are caught, and a fallback UI is shown instead of a blank screen.&lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  Route-Based Lazy Loading with React Router
&lt;/h3&gt;

&lt;p&gt;Route-based lazy loading is an efficient way to split code based on user navigation, especially when dealing with large applications. Instead of loading all route components upfront, you can use React.lazy() to dynamically load the route components only when needed. Here’s an example using React Router:&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%2Fitj0vgb8np9qanfq3nro.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%2Fitj0vgb8np9qanfq3nro.png" alt="react router dom"&gt;&lt;/a&gt;&lt;br&gt;
In this example, the Home and Products components are lazily loaded when the user navigates to their respective routes, optimizing the application's performance.&lt;br&gt;
 &lt;/p&gt;

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

&lt;p&gt;Lazy loading is a highly effective way to optimize React applications by loading components and resources only when they are needed. It significantly improves performance, reduces bandwidth usage, and enhances the overall user experience. By using React.lazy() and React.Suspense, along with error boundaries and route-based lazy loading, you can make your React applications more efficient and user-friendly.&lt;br&gt;
 &lt;/p&gt;

&lt;p&gt;To learn more about Dualite, visit our official website &lt;a href="https://www.dualite.dev/" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>developer</category>
      <category>javascript</category>
      <category>react</category>
    </item>
    <item>
      <title>Why are Developers Still Unhappy ?</title>
      <dc:creator>Team Dualite</dc:creator>
      <pubDate>Mon, 02 Sep 2024 15:51:39 +0000</pubDate>
      <link>https://forem.com/dualite/why-are-developers-still-unhappy--56bl</link>
      <guid>https://forem.com/dualite/why-are-developers-still-unhappy--56bl</guid>
      <description>&lt;p&gt;The following is an aggregation of a reddit post that you can find &lt;a href="https://www.reddit.com/r/react/comments/1ez40gs/why_are_developers_still_unhappy/?utm_source=share&amp;amp;utm_medium=web3x&amp;amp;utm_name=web3xcss&amp;amp;utm_term=1&amp;amp;utm_content=share_button" rel="noopener noreferrer"&gt;here&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Let me start off by saying that I’m not a developer. I’m a person who probably knows a bit or two about HTML/CSS, and only can correlate it with the designer developer handoff since I’ve been a designer.&lt;/p&gt;

&lt;p&gt;The counterintuitive idea of why I should give opinions about someone’s hardships that I myself have not experienced is a valid question. This should not be a simple GPT summarisation article, right? It should stand for something more. &lt;/p&gt;

&lt;p&gt;I’m writing this because one of my closest friends(who also happens to be my co-founder) is also a developer. And I find developers fascinating. For me, they’ve always been the real builders of modern day technological convenience that an average person experiences without even realizing it.&lt;/p&gt;

&lt;p&gt;I actually read this Stackoverflow &lt;a href="https://survey.stackoverflow.co/2024/" rel="noopener noreferrer"&gt;report&lt;/a&gt;, which stated that over 80% of developers actively hate their job. Although if you ask people from any industry and get a survey done you would find mostly that people usually hate or do not actively like the job that they’re doing. &lt;/p&gt;

&lt;p&gt;But I had assumed that software development would be different. I had heard of people making not only good money, but also creating something truly valuable which solves real life problems. Boy, was I wrong. &lt;/p&gt;

&lt;p&gt;After researching and digging more, especially motivated by Fireship’s video on the &lt;a href="https://www.youtube.com/watch?v=-pSf9_MgsZ4" rel="noopener noreferrer"&gt;same&lt;/a&gt;, I was motivated to dig further, for which I posted this reddit thread. &lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  The human element
&lt;/h3&gt;

&lt;p&gt;“People are the biggest impact to your happiness in any industry. Shitty coworkers, product owners, bosses, and customers will consistently ruin your workday.” ~ Literature-South, Reddit User&lt;/p&gt;

&lt;p&gt;Software development and the early Internet in its nascent stages used to be fun. It used to be run by weird geniuses like Steve Woz, Sergrey Brin, Sean Parker…building, breaking and disrupting the status quo of how things should be. &lt;/p&gt;

&lt;p&gt;There’s a great &lt;a href="https://joanwestenberg.medium.com/i-miss-the-internet-c7e41544a8b9" rel="noopener noreferrer"&gt;article&lt;/a&gt; by Joan Westenberg on how the early internet was a vast frontier, a place of self-discovery and websites were less about utility and more about passion, early web developers crafting their domains as personal expressions, and how the pioneering spirit of early internet users has been lost in transition to a space dominated by a handful of tech behemoths. Adding on to that, the dead Internet theory is also gaining ground which asserts that the Internet now consists mainly of bot activity and automatically generated content.&lt;/p&gt;

&lt;p&gt;Nonetheless, this capitalistic expansion made fun and cool software companies into corporate dinosaurs. The piled up pressure in a mammoth IT firm from Vice Chairman's, Sr. executives, Managers who have zero idea about software development, and set unrealistic expectations all comes crashing down to the boots-on-ground engineers who need to make it work anyhow. &lt;/p&gt;

&lt;p&gt;And unfortunately,  this is what the norm has become of a typical dev persona. Constantly in a rush and tension, getting something done and pushing up a feature by crunching up nights but nobody celebrating and assuming that this was the bare minimum that was expected. &lt;/p&gt;

&lt;p&gt;Even if&lt;a href="https://www.dualite.dev/" rel="noopener noreferrer"&gt; our automation tool&lt;/a&gt; could automate 30% of the UI development work, I’m sure the Sr. manager would give 30% more work to the end frontend engineer. That is what the sad state of affairs has come down to. Developers want to build safe, stable and high-performing applications while managers are focused on maximizing profit, sometimes at the expense of these technical goals.   &lt;/p&gt;

&lt;p&gt;That is where technical debt also comes into play, basically the old codebase on top of which new code and logics are built never gets re-written again since managers never allow time for starting over and revamping the core base. This conglomeration of unaddressed technical debt, outdated legacy frameworks on which devs are forced by managers to build, microaggressions and excessive meetings by managers with no real value add, becomes a nightmare for a smart and sincere developer and makes them into a burnt out and extremely anxious person. &lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  Glamourising software development
&lt;/h3&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%2Fhu5vktmr91pqqslgikpk.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%2Fhu5vktmr91pqqslgikpk.png" alt="developer" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A part of the problem also lies in how software developers are seen. The faces of Mark Zuckerberg, Elon Musk, are shown one too many times, developers turning into entrepreneurs and creating world-changing software like PayPal, and Facebook while coding naively on their laptops and sitting on their couch. &lt;/p&gt;

&lt;p&gt;This notion of assuming software engineering is purely about coding, and getting worked up when developers also have to perform other important skills like planning, monitoring and gathering data, managing a tech team. Adding on top of that, the money. &lt;/p&gt;

&lt;p&gt;Today the so-called popular languages like PHP(which made Zuck a billionaire at the time) is the lowest paid language with &lt;a href="https://survey.stackoverflow.co/2024/" rel="noopener noreferrer"&gt;a median salary of $49k&lt;/a&gt; while less popular languages like Erlang or low level languages like Rust earn better salaries. Management is such an important skill to have for higher salary expectations but many developers solely become a developer to make ‘good money' but don’t want to get their hands dirty in client relations.&lt;/p&gt;

&lt;p&gt;Moreover, job security is a serious issue. A famous example is how the entire tech team of GTA 5 was laid off, one of the most successful video games ever in history. Moreover, outsourcing has allowed more instability where experienced devs working for years are easily replaced because the company decided to outsource the work to another country at a cheaper rate. &lt;/p&gt;

&lt;p&gt;Global tech layoffs have further fueled this anxiety especially due to post-COVID corrections, with more than &lt;a href="https://www.thehindu.com/sci-tech/technology/tech-layoffs-2024-job-cuts-at-microsoft-google-apple-and-other-firms/article68572100.ece#:~:text=According%20to%20the%20tracker%20Layoffs,layoffs%20since%202022%20to%20428%2C449." rel="noopener noreferrer"&gt;428,000+&lt;/a&gt; technical experienced employees losing their jobs since 2022. &lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  Building the right team
&lt;/h3&gt;

&lt;p&gt;At the end of the day, developers are also human. If the manager or PM has a technical alignment, understands how software development works with a great team culture, and overall respects the time and efforts, developers tend to stick through happily.&lt;/p&gt;

&lt;p&gt;There has been some positive change towards developer culture, especially around the onboarding or interview process. Traditionally, a brutal 3 to 5 stage interview with a test project and a pair programming exercise has been replaced with open-source challenges or projects and referrals, fostering an overall strong culture from the start and making the developer feel welcome. &lt;/p&gt;

&lt;p&gt;Another reason has been agile. Developers are spending most of their time filling “Jira” tickets, and painfully trying to get stuff into production as soon as possible. Lou-Saydus from Reddit said it best “Modern software development is like being in an abusive relationship where every single little thing you do is scrutinized and requires justification on why it took you x amount of time.”&lt;/p&gt;

&lt;p&gt;Finally, most developers are working on a product they don’t care about. If you as a leader can help generate the right intrinsic motivation with a vision that each developer can align to, that automatically sets a starting point for a great culture. If you’re building a DevTool, that motivation automatically comes handy since you’re building for developers.&lt;br&gt;
 &lt;/p&gt;

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

&lt;p&gt;There should be more awareness around developer work experience. Globally the demand for good programmers is only going to increase, and we can’t have good devs leaving their jobs because of being burnt out and mentally abused. &lt;/p&gt;

&lt;p&gt;Bill Gates said it best, “Measuring programming progress by lines of code is like measuring aircraft building progress by its weight.” And if we want our softwares to fly high, we’ve got to respect the builders that make it go in the air.&lt;/p&gt;

</description>
      <category>developers</category>
      <category>programmers</category>
      <category>coding</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Power of Tailwind</title>
      <dc:creator>Team Dualite</dc:creator>
      <pubDate>Thu, 29 Aug 2024 14:12:13 +0000</pubDate>
      <link>https://forem.com/dualite/power-of-tailwind-4bdm</link>
      <guid>https://forem.com/dualite/power-of-tailwind-4bdm</guid>
      <description>&lt;p&gt;Tailwind is making waves in the web development world, and it’s not just another CSS framework. It’s part of a bigger shift towards utility first design, which is all about giving you the tools to craft your UI exactly as you need it, without the restrictions of traditional CSS frameworks. But what exactly is driving this shift, and why are so many developers jumping on board? Let’s break it down and dive into the concepts, the reasons behind Tailwind’s popularity, and how it stacks up against more traditional approaches&lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  Why Developers are Embracing Tailwind
&lt;/h3&gt;

&lt;p&gt;Let’s get straight to the point: Utility first frameworks are popular because they give you control. Tailwind CSS doesn’t hand you pre made components. Instead, it gives you a set of  building blocks, small and single purpose utility classes that you can mix and match to create your designs. It’s like having a box of Lego pieces instead of pre-built models. You get to create whatever you want, exactly how you want it.&lt;/p&gt;

&lt;p&gt;This approach is particularly powerful for developers who are tired of fighting against opinionated frameworks like Bootstrap, where you spend more time overriding styles than building new ones, with Tailwind, you start from scratch, crafting your UI with precision. Plus, Tailwind’s customization options let you tweak everything that your design systems aligns perfectly with your project’s needs&lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  But, what are Utilities ?
&lt;/h3&gt;

&lt;p&gt;Before we go further, let’s clear up what we mean by “utilities” in the context of Tailwind. Utilities are tiny, single purpose classes that do a single task such as p-2 sets padding to 0.5rem similarly m-2 sets margin to 0.5rem. Instead of writing custom CSS for each element, you apply these utility classes directly in your HTML structure&lt;/p&gt;

&lt;p&gt;For example, instead of writing below CSS:&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%2Fzhoq9ej0jea8h97l9730.jpeg" 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%2Fzhoq9ej0jea8h97l9730.jpeg" alt="css code" width="800" height="335"&gt;&lt;/a&gt;&lt;br&gt;
You’d use utilities directly in your HTML structure, see below:&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%2Ff6696jith6bp1shdj7e7.jpeg" 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%2Ff6696jith6bp1shdj7e7.jpeg" alt="tailwind code" width="800" height="266"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;bg-blue-500&lt;/strong&gt;: It gives the element a blue color background&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;p-4&lt;/strong&gt;: This is to set padding to 1rem or 16px&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;mb-8&lt;/strong&gt;: This is to set margin bottom to 2rem or 32px&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But how do i know these values, it’s all mention in the Tailwind official docs, check &lt;a href="https://tailwindcss.com/docs/installation" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The beauty of this approach is that it’s super fast. You’re not constantly flipping back and forth between your HTML and CSS files. Everything happens in one place, and you have full control over every aspect of your design. Plus, it makes your code more consistent and easier to maintain as your project grows&lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  Advanced Usage
&lt;/h3&gt;

&lt;p&gt;Once you are comfortable with the basics. It’s time to level up. Tailwind shines when it comes to scaling your projects. If you have ever struggled to keep a large codebase clean and manageable, Tailwind has your back. By leveraging the &lt;code&gt;@apply&lt;/code&gt; directive, you can bundle frequently used utilities into custom classes. This keeps your HTML clean while still benefiting from the utility first approach&lt;/p&gt;

&lt;p&gt;For example, you can create a &lt;strong&gt;.btn-primary&lt;/strong&gt; class as follows:&lt;br&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%2F5caoyp4a40x5n5v1ftg4.jpeg" 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%2F5caoyp4a40x5n5v1ftg4.jpeg" alt="tailwind code" width="800" height="214"&gt;&lt;/a&gt;&lt;br&gt;
Instead of writing all these classes again and again you can use &lt;strong&gt;.btn-primary&lt;/strong&gt; anywhere in your project to apply all these classes at once, just by placing this in your CSS file&lt;/p&gt;

&lt;p&gt;This not only reduces repetition but also makes it easy to update your design system across your entire project. &lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  Embracing Design Consistency with Tailwind
&lt;/h3&gt;

&lt;p&gt;Let’s talk about one of the often overlooked superpowers of Tailwind which is Design Consistency. When you are building a project, especially a large one, keeping everything consistent across the project can be a real challenge. Different developers, different components and evolving requirements can quickly lead to a disjointed design. That’s where Tailwind comes in, offering you a rock solid foundation for maintaining consistency&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Standardized Design System&lt;/strong&gt;: With Tailwind, you are not just using a framework, you are building on a highly configurable design system that aligns perfectly with your brand’s style guide. Tailwind’s utility classes like ‘text-lg’, ‘bg-blue-500’ or ‘p-4’ ensures that the same spacing, colors, and typography are used consistently across your entire project. While working in a team, you can even add your own design system configuration and use those utility classes across the project&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Scalability and Maintenance&lt;/strong&gt; : Let’s face it: as your project grows, maintaining consistency becomes harder. Tailwind’s utility-first approach makes it easier to keep things organized. Because you’re working with a fixed set of utilities, there’s no need to create new custom classes for every new element. This makes your codebase easier to maintain, as you’re not constantly reinventing the wheel or adding unnecessary complexity. Even if you need to tweak your design system down the line say, adjusting your primary color from blue to green, you can do so easily by updating your Tailwind configuration. This change will automatically propagate across your entire project, ensuring that every instance of that color remains consistent.&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Streamlined Collaboration&lt;/strong&gt; : If you’ve ever worked on a project with multiple developers, you know how challenging it can be to maintain a cohesive design. With Tailwind, everyone is using the same set of utilities, which means there’s less room for interpretation and fewer chances for visual inconsistencies to creep in. This is particularly valuable in a fast-paced environment where multiple features are being developed simultaneously.&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Tailwind CSS and Modern JavaScript Frameworks
&lt;/h3&gt;

&lt;p&gt;If you’re working with modern JavaScript frameworks like React, Vue, or Angular, Tailwind CSS is not just a good fit but it’s a match made in heaven. Tailwind’s utility-first approach dovetails beautifully with the component-based architecture of these frameworks, making it easier than ever to build clean and reusable components.&lt;br&gt;
 &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Seamless Component Integration&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In a component-based architecture, keeping your styles close to your logic is crucial for maintainability. With Tailwind, you can define all your styles directly in your component’s JSX, Vue, or Angular templates. There’s no need to switch between files, which speeds up development and keeps your components self-contained. For example, in React, you might have a button component that looks like this:&lt;br&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%2F6kf2h5l2q67l5lr5e9fe.jpeg" 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%2F6kf2h5l2q67l5lr5e9fe.jpeg" alt="reactjs code" width="800" height="269"&gt;&lt;/a&gt;&lt;br&gt;
Notice how all the styling is right there in the component? This makes it easy to see exactly how your component will look without needing to check a separate CSS file.&lt;br&gt;
 &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dynamic Styling Made Easy&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Tailwind also shines when it comes to dynamic styling. Whether you need to toggle a class based on state, or apply different styles based on props, Tailwind makes it simple. You can use JavaScript expressions to dynamically set class names, allowing for highly flexible and responsive UIs.&lt;br&gt;
For instance, let’s say you want to change the button’s color based on a prop:&lt;br&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%2Fvm1r0g49x096e5rmvvnp.jpeg" 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%2Fvm1r0g49x096e5rmvvnp.jpeg" alt="reactjs code" width="800" height="235"&gt;&lt;/a&gt;&lt;br&gt;
Here, &lt;code&gt;typeStyles&lt;/code&gt; changes dynamically based on the &lt;code&gt;type&lt;/code&gt; prop, allowing you to easily switch between a primary and secondary button without writing any additional CSS.&lt;br&gt;
 &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Leveraging Tailwind’s Best Practices&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Tailwind also encourages best practices in modern development workflows. Since you’re working with small, reusable utilities, your components are naturally more modular and easier to test. This aligns perfectly with the principles of modern frameworks, where components should be small, focused, and reusable across your application.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tailwind CSS vs Traditional CSS Frameworks
&lt;/h3&gt;

&lt;p&gt;When it comes to CSS performance, Tailwind stands out for several reasons, particularly when compared to traditional CSS methodologies. Traditional CSS frameworks like Bootstrap come with predefined components and styles, which often lead to bloat loading a lot of unused CSS by default.&lt;/p&gt;

&lt;p&gt;Traditional CSS frameworks are designed with a one-size-fits-all mentality. They come bundled with an extensive set of styles and components to cover a broad range of use cases. &lt;/p&gt;

&lt;p&gt;Tailwind on the other hand, is designed to generate only the styles you actually use, which is a game changer for performance. With the introduction of Just-in-Time (JIT), Tailwind dynamically generates the necessary CSS during development. This means your final CSS bundle includes styles that are directly used in your HTML file &lt;br&gt;
 &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Performance Edges :&lt;/strong&gt;&lt;br&gt;
 &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Lean CSS Bundles&lt;/strong&gt;: Unlike traditional frameworks, Tailwind doesn’t generate a massive CSS file with hundreds of unused classes. Instead, it creates only the styles you need, keeping the CSS payload minimal&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;JIT Compilation&lt;/strong&gt;: Tailwind dynamically generates only the CSS needed for your project, significantly reducing file size by creating styles on-the-fly as you code. It dynamically generates your CSS on-demand as you write your HTML. This is a game-changer because it means that you’re only ever loading the exact CSS you need, nothing more, nothing less.&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Consistency Across Projects&lt;/strong&gt;: By sticking to utility classes, Tailwind eliminates the need for complex specificity battles common in traditional CSS. This not only boosts performance but also make your codebase easier to maintain over time&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;PurgeCSS Integration&lt;/strong&gt;: PurgeCSS removes any unused styles from the final build, ensuring that your production CSS is as lean as possible. Tailwind integrates seamlessly with PurgeCSS offering developers a productive environment.&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Real Word Impact
&lt;/h3&gt;

&lt;p&gt;In practical terms, websites built with Tailwind often outperform those built with traditional frameworks in terms of load time and responsiveness, For example, using Tailwind in a project can result in a CSS bundle as small as 3-6 KB, compared to 100 KB or more with traditional CSS frameworks. This difference is crucial, especially for performance sensitive applications like E-Commerce sites or mobile first experience&lt;br&gt;
 &lt;/p&gt;

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

&lt;p&gt;The utility-first approach of Tailwind not only provides developers with unparalleled flexibility and customization but also significantly improves performance by reducing  CSS file sizes and eliminating unnecessary styles. When compared to traditional CSS frameworks, Tailwind’s optimized approach ensures that your application is lean, fast and scalable. &lt;/p&gt;

&lt;p&gt;Dualite also supports Tailwind which lets you convert your figma designs to Tailwind code. &lt;br&gt;
 &lt;/p&gt;

&lt;p&gt;To learn more about Dualite, visit our official website &lt;a href="https://www.dualite.dev/" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>tailwindcss</category>
      <category>frontend</category>
      <category>react</category>
    </item>
    <item>
      <title>3 Ways To Add Custom Animations</title>
      <dc:creator>Team Dualite</dc:creator>
      <pubDate>Thu, 29 Aug 2024 13:49:52 +0000</pubDate>
      <link>https://forem.com/dualite/3-ways-to-add-custom-animations-fhm</link>
      <guid>https://forem.com/dualite/3-ways-to-add-custom-animations-fhm</guid>
      <description>&lt;p&gt;Animations can breathe life into your web projects, adding a dynamic flair that captivates users. Whether you want to create subtle UI effects or complex 3d animations, understanding how to craft custom animations is a crucial skill. In this blog, we’ll explore popular ways to create custom animations&lt;/p&gt;

&lt;p&gt;Let’s dive in!&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Custom Animations with HTML/CSS and Javascript&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Setting up the basic structure&lt;/strong&gt;: Start by creating the HTML structure, link your CSS and Javascript file. We’ll animate a simple box that moves across the screen and changes color. See the code below:
&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%2Ffj21jinq8iuw3urifif9.png" alt="html code" width="800" height="455"&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%2F8ailmn2s0jqt1avpnjao.png" alt="css code" width="800" height="389"&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Adding CSS Keyframes&lt;/strong&gt; : Let’s define a basic keyframe animation in CSS that moves the box horizontally and changes it color, see the code below:
&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%2Fie30qdrpjr3tamxc4ku9.png" alt="css code" width="800" height="737"&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Animation Property&lt;/strong&gt;: Animation property is added in .box with a name &lt;code&gt;moveAndColor&lt;/code&gt; to define their keyframes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;@keyframes&lt;/strong&gt; : Keyframes are added for &lt;code&gt;moveAndColor&lt;/code&gt; in 3 stage 0%, 50% and 100% respectively where box moves and changes its background color
To learn more about Animations and Keyframes, check &lt;a href="https://www.w3schools.com/css/css3_animations.asp" rel="noopener noreferrer"&gt;here&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Let’s see the animation:
&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%2F1if3191en1hb3qxu3rsk.gif" alt="animation output" width="426" height="240"&gt;
&lt;/li&gt;
&lt;li&gt;Animation is working as intended, but as you can see the animation is triggering automatically. Let’s add Javascript to implement interactivity to this animation. The idea is to stop and start the animation when the box is clicked. See the code below:
&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%2F5a45w6d2b82q33cha41y.png" alt="javascript code" width="800" height="438"&gt;
&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;click&lt;/strong&gt; event listener is added on &lt;strong&gt;.box&lt;/strong&gt; which basically triggers the inner logic whenever the user clicks on &lt;strong&gt;.box&lt;/strong&gt; , to learn more about event listeners in Javascript, check &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener" rel="noopener noreferrer"&gt;here&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Let’s see how it works:
&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%2Fuwaq4p7i124mbna3h3tf.gif" alt="animation output" width="426" height="240"&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Adding 3d animations using Three.js&lt;/strong&gt;&lt;br&gt;
 &lt;/p&gt;

&lt;p&gt;Three.js is used to add 3D elements and animations into your project. You can use Three.js in Javascript and libraries like React, the steps are pretty much the same. For ease of this blog we will implement this in HTML/CSS and Javascript&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Include Three.js library&lt;/strong&gt; : We will add the CDN script to our HTML to include Three.js into the project. If you are building it with React.js then install the library using your preferred package manager such as npm or yarn. Read more about installation &lt;a href="https://threejs.org/docs/#manual/en/introduction/Installation" rel="noopener noreferrer"&gt;here&lt;/a&gt;. See the HTML below:
&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%2Fepywuuvvtldl3gs86adc.png" alt="html code" width="800" height="455"&gt;
&lt;/li&gt;
&lt;li&gt;Now, let’s start with the Javascript code to set up Three.js. To actually be able to display anything with Three.js, we need three things: scene, camera and renderer, so that we can render the scene with camera. Detailed explanation &lt;a href="https://threejs.org/docs/#manual/en/introduction/Creating-a-scene" rel="noopener noreferrer"&gt;here&lt;/a&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%2F2ntlwg4fop2u47zoika2.png" alt="javascript code" width="800" height="411"&gt;
&lt;/li&gt;
&lt;li&gt;Let’s define the renderer properties such as PixelRatio, Canvas size, and the position of the camera
&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%2Fz9bv0xsl13g20ietlxzy.png" alt="js code" width="800" height="215"&gt;
&lt;/li&gt;
&lt;li&gt;Next step is to define an object. To define an object in Three.js, we have to use Geometries from Three.js such as BoxGeometry, TorusGeometry and many more. In this we will use TorusGeometry and then add the geometry to the scene. Learn about various geometries &lt;a href="https://threejs.org/docs/#api/en/geometries/BoxGeometry" rel="noopener noreferrer"&gt;here&lt;/a&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%2F6qxwimipbahtq4zevc6w.png" alt="js code" width="800" height="345"&gt;
&lt;/li&gt;
&lt;li&gt;Now, it’s time to animate the TorusGeometry. We will rotate the Torus on three axis : x,y and z respectively inside animate function, calling it later. See below:
&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%2Fn1jddquswtanvzk3g5is.png" alt="javascript code" width="800" height="389"&gt;
&lt;/li&gt;
&lt;li&gt;It’s done, let’s see how our animation looks like:
&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%2Fyxuf4brbe6hxgb5dn7qb.gif" alt="threejs torus animation" width="426" height="240"&gt;
&lt;/li&gt;
&lt;li&gt;You can create amazing and unrealistic animations with Three.js, see examples &lt;a href="https://threejs.org/examples/#webgl_animation_keyframes" rel="noopener noreferrer"&gt;here&lt;/a&gt;. Three.js is incredibly powerful to create custom 3D animations. This example is taken from &lt;a href="https://www.youtube.com/watch?v=Q7AOvWpIVHU&amp;amp;t=317s" rel="noopener noreferrer"&gt;Fireship Youtube Channel&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Using Dualite: Figma to Code Tool&lt;/strong&gt;&lt;br&gt;
Dualits is Figma to Code extension which converts any design into efficient code including animations. Lets see how to use Dualite and convert animations into code&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Launch Dualite and Login with Figma account
&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%2Fn2ic34sokj7s9jgsra10.png" alt="dualite login screen" width="373" height="738"&gt;
&lt;/li&gt;
&lt;li&gt;Provide Figma File URL
&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%2Fqvzccg5ifgpdhyvsktc2.png" alt="duaite figma link screen" width="370" height="737"&gt;
&lt;/li&gt;
&lt;li&gt;Select appropriate component: Component Mode or Page Mode. Learn about Component and Page Mode in detail &lt;a href="https://www.dualite.dev/blog/component-mode-and-page-mode-in-dualite-complete-explanation" rel="noopener noreferrer"&gt;here&lt;/a&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%2Fxfcd1l1jl6bvrshwk0fv.png" alt="dualite select mode screen" width="377" height="737"&gt;
&lt;/li&gt;
&lt;li&gt;Now, when you are at the home screen of Dualite:

&lt;ol&gt;
&lt;li&gt;Select your animation&lt;/li&gt;
&lt;li&gt;Select desired frameworks. In this example, React and CSS are the target frameworks&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;CONVERT TO CODE&lt;/strong&gt; button
&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%2Fefkm1mjwkoskajwstorp.png" alt="dualite select animation screen" width="800" height="449"&gt;
&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;

&lt;li&gt;Below is the output screen from where you can download the code as ZIP or preview it in CodeSandBox.
&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%2F1sowswd4w0yp5i2xor3b.png" alt="dualite output screen" width="800" height="449"&gt;
&lt;/li&gt;

&lt;li&gt;Let’s preview it and see how it looks:
&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%2Fzs8eogoqq1pnq860wo82.gif" alt="dualite animation preview" width="426" height="240"&gt;
&lt;/li&gt;

&lt;li&gt;Looking exactly how our design was. Now, you can use this animation code in your project 
 &lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;/ol&gt;

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

&lt;p&gt;Creating custom animations, whether in 2D with HTML, CSS, and JavaScript, in 3D with Three.js or using Dualite to generate code automatically, can be a rewarding experience. The key is understanding the basics and then experimenting with more complex ideas. As a developer, these skills will allow you to craft visually appealing and interactive experiences that engage users.&lt;br&gt;
Try out all the methods and see what works best for your project.&lt;br&gt;
 &lt;/p&gt;

&lt;p&gt;To learn more about Dualite, visit our official website &lt;a href="https://www.dualite.dev/" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>threejs</category>
      <category>javascript</category>
      <category>developer</category>
      <category>frontend</category>
    </item>
    <item>
      <title>How to add Google Fonts and Custom Fonts to your Web App</title>
      <dc:creator>Team Dualite</dc:creator>
      <pubDate>Sat, 24 Aug 2024 08:48:49 +0000</pubDate>
      <link>https://forem.com/dualite/how-to-add-google-fonts-and-custom-fonts-to-your-web-app-99a</link>
      <guid>https://forem.com/dualite/how-to-add-google-fonts-and-custom-fonts-to-your-web-app-99a</guid>
      <description>&lt;p&gt;Fonts are a core part of any web application’s design impacting everything from readability to the overall user experience. As developers, it’s essential to know how to add and manage fonts effectively. This guide will take you through two key methods: Integrating Google Fonts and adding Custom Fonts using ‘@font-face’ rule&lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Why Fonts Matter in Web Development&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Fonts are more than just a design element. The right font can make your web app more engaging and user friendly, while the wrong one can detract from the user experience. So, let’s dig into how you can seamlessly incorporate fonts into your web projects&lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Adding Google Fonts&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Google fonts offers a wide range of free, high quality fonts that are easy to integrate, Here’s how to do it&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Choose your font&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to &lt;a href="https://fonts.google.com/" rel="noopener noreferrer"&gt;Google Fonts&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Browse or search for the font you want&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%2F5jmug5zdbbermzbba5kl.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%2F5jmug5zdbbermzbba5kl.png" alt="google font"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click on the font to see its details and available styles&lt;/li&gt;
&lt;li&gt;Select the styles you want to include and click on &lt;strong&gt;Get Font&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%2Fi5fmm5osxjtk9pnheatm.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%2Fi5fmm5osxjtk9pnheatm.png" alt="google font"&gt;&lt;/a&gt;&lt;br&gt;
 &lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Embed the font&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click on Get Embed Code button&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%2F1w0jpqsgpp06s8dh709b.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%2F1w0jpqsgpp06s8dh709b.png" alt="google font"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;After selecting your font, Google Fonts gives you a couple of ways to add it to your project. Under web via a &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt; tag in your HTML or by importing it through CSS, let’s see both of them&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%2Fyelgdv90206emfjg19mq.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%2Fyelgdv90206emfjg19mq.png" alt="google font"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Using &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt; tag in HTML

&lt;ul&gt;
&lt;li&gt;Copy/Paste the embed code in your HTML  and apply the font in your CSS file&lt;/li&gt;
&lt;/ul&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%2Ffpvy7eqjppisv0gyp2tp.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%2Ffpvy7eqjppisv0gyp2tp.png" alt="google font"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;See the code below:&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%2Fwl9gdjir8iyzo0v28gxn.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%2Fwl9gdjir8iyzo0v28gxn.png" alt="vscode"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Output :&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%2Ff6xg39nk66bcu6s4rfk3.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%2Ff6xg39nk66bcu6s4rfk3.png" alt="output screen"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Using &lt;code&gt;**@import**&lt;/code&gt; rule in CSS : 

&lt;ul&gt;
&lt;li&gt;Copy and Paste the import rule code under web and import option on Google Font at the top of the CSS file&lt;/li&gt;
&lt;/ul&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%2Fymggr9o2yo645evu9fug.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%2Fymggr9o2yo645evu9fug.png" alt="google font"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;As you can see in the code below, i have added &lt;code&gt;**@import**&lt;/code&gt; rule at the top of the CSS file&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%2Fa1nrx9qud7vxwzcgcdi9.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%2Fa1nrx9qud7vxwzcgcdi9.png" alt="vscode"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Output:&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%2Fcyna7f30nutk7dffw0jo.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%2Fcyna7f30nutk7dffw0jo.png" alt="output screen"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Adding Custom Fonts&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Sometimes, you might want to use a custom font that isn’t available on Google Fonts. The &lt;code&gt;@font-face&lt;/code&gt; rule let’s you host and use any font you have the rights to, offering you full control over your typography&lt;br&gt;
 &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Get the Font Files&lt;/strong&gt;&lt;br&gt;
You can find free fonts from the internet in common formats:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;.woff (Web Open Font Format)&lt;/li&gt;
&lt;li&gt;.woff2 (Web Open Font Format 2)&lt;/li&gt;
&lt;li&gt;.ttf (TrueType Font)&lt;/li&gt;
&lt;li&gt;.eot (Embedded OpenType)
 &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Define the &lt;code&gt;@font-face&lt;/code&gt; Rule&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%2Fiy79qp3qxwlt5evj3lxh.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%2Fiy79qp3qxwlt5evj3lxh.png" alt="vscode"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;font-family&lt;/strong&gt; property is a required field which lets you name your font. You can name it whatever you want.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;src&lt;/strong&gt; property is a required field where you need to provide the path or a URL from where the font can be downloaded&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;font-weight&lt;/strong&gt; is used to define the boldness of your font, default is normal and we have used bold&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are more properties you can to customize your font, check &lt;em&gt;&lt;a href="https://www.w3schools.com/cssref/css3_pr_font-face_rule.php" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Apply the Font&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Just like any other font, apply it exactly like this in your CSS file, see below&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7hhycaqeylnxdl3keg1v.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%2F7hhycaqeylnxdl3keg1v.png" alt="vscode"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;See output screen below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo2ayrvnd5rmruom3b1nw.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%2Fo2ayrvnd5rmruom3b1nw.png" alt="output screen"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;Adding and managing fonts in your web apps is an essential skill for any developer. Whether you are using the convenience of Google Fonts or the control of custom fonts, these methods ensure your app looks great and performs well. With the right approach, you can create a more engaging and visually appealing user experience ensuring the consistency of the font all over your web application.&lt;br&gt;
 &lt;/p&gt;

&lt;p&gt;To learn more about Dualite, check our official website &lt;a href="https://www.dualite.dev/" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>development</category>
      <category>developer</category>
      <category>frontend</category>
      <category>programmers</category>
    </item>
    <item>
      <title>The Guide to learn Frontend Development</title>
      <dc:creator>Team Dualite</dc:creator>
      <pubDate>Wed, 21 Aug 2024 16:06:53 +0000</pubDate>
      <link>https://forem.com/dualite/the-guide-to-learn-frontend-development-2bmo</link>
      <guid>https://forem.com/dualite/the-guide-to-learn-frontend-development-2bmo</guid>
      <description>&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%2F5ix2b4dvqogvv1zryhg9.jpeg" 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%2F5ix2b4dvqogvv1zryhg9.jpeg" alt="Guide to learn frontend main header image" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Frontend Development is one of the most sought after skills in the tech industry today. With the ever growing demand for interactive and user friendly websites, mastering frontend development opens doors to numerous career opportunities for you. This guide will walk you through everything you need to know, from understanding its basics to joining developer communities&lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  What is Frontend Development ?
&lt;/h3&gt;

&lt;p&gt;Frontend Development, also known as client side development, is all about creating the visual and interactive aspects of a website or web application. It is everything users see and interact with when from buttons and text to animations and images. Your goal as a frontend developer is to ensure that the website is not only functional but also very visually appealing and responsive across different devices. &lt;/p&gt;

&lt;p&gt;Let’s understand where frontend development relies in a website architecture :&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%2Fjml0gvgv2mn0ap8tt6a0.jpeg" 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%2Fjml0gvgv2mn0ap8tt6a0.jpeg" alt="web architecture" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A website is not just made of frontend, but it needs backend too. As you can see in the above diagram, Frontend communicates to the server (backend) and backend performs all the necessary operations on the database such as storing, updating, reading and deleting data. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;So, frontend is the part where user comes from their browsers and interact with it and that frontend communicates users request to the backend according to the user interactions, the person who builds frontend is a Frontend Developer&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Similarly, person who works on the backend is a Backend Developer&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Motivation and Mindset
&lt;/h3&gt;

&lt;p&gt;Your mindset will play a crucial role in your journey to mastering frontend development. A fixed mindset might tell you that if you don’t get something right away, you never will, but here’s the truth : Your abilities are not set in stone, with a growth mindset, you recognize that effort and persistence can help you learn anything, no matter how challenging it seems at first&lt;/p&gt;

&lt;p&gt;There will be times when you struggle with concepts or hit a roadblock on a project, when that happens, remind yourself that this struggle is part of the process. The key is persistence. Every obstacle you overcome is proof that you can learn and grow. Real learning happens when you push through these tough moments&lt;/p&gt;

&lt;p&gt;As you work through the complexities of frontend development, embrace the challenges and don’t forget to celebrate your progress. Whenever you doubt yourself, look back at the skills you have gained and the projects you have completed, That’s your proof that you are on the right track and to keep yourself motivated&lt;/p&gt;

&lt;p&gt;Before diving into frontend development, take a moment to reflect on why you are here. What drives you to learn programming ? Is it the promise of a rewarding career, the thrill of creating something new or the ambition to build that app idea you have always dreamed of ? Maybe it’s the desire to start your own company. Whatever your reasons, keep them close. Your motivation is what will guide your goals in clear sight&lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  Learning Process
&lt;/h3&gt;

&lt;p&gt;Learning frontend, programming or any skill is not like following a specific roadmap but it also depends on how you learn all the skills and the process of learning. When learning Frontend development, understanding concepts is just the beginning. To truly grasp how everything fits together, you need to practice what you have learned. Building projects is the ultimate way to bridge the gap between theory and real world application. It’s where the concepts you have studied come to life, and you gain the hand on experience needed to make them stick&lt;/p&gt;

&lt;p&gt;Your brain works in two modes : Focus Mode and Diffuse Mode. Focus mode is when you are actively engaged, reading, coding or watching tutorials. Diffuse mode kick in when you are not directly focused on learning, like when you are taking a walk, doing chores or even subconsciously connecting the dots between what you have learned and everything else you know. &lt;/p&gt;

&lt;p&gt;Understanding how these two modes work can make your learning process more effective. If you are stuck on a problem, sometimes the best thing to do is step away. Give your brain a chance to process in the background, but make sure you have put in some effort first, your mind needs something to work with while you are taking that break&lt;/p&gt;

&lt;p&gt;So, dive into learning, build projects because that is the best way to learn development and when you are stuck remember to give your mind some space to work things out, this is one of the best ways to learn.&lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  Prerequisite
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Basics of Computer&lt;/strong&gt; : Get some basic understanding of how computer works, about the operating system, various hardware and software which you can learn from &lt;a href="https://www.youtube.com/watch?v=y2kg3MOk1sY" rel="noopener noreferrer"&gt;Freecodecamp Youtube channel&lt;/a&gt;&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;How does the web work&lt;/strong&gt; : Learn about the internet, how the data is transferred, various protocols of the internet, difference between web page, browser and a server, client, IP addresses and more. Learn from amazing video by &lt;a href="https://www.youtube.com/watch?v=hJHvdBlSxug" rel="noopener noreferrer"&gt;Academind on Youtube&lt;/a&gt;&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Command Line Basics&lt;/strong&gt; : Learn how to use Command Line Interface on your system, maybe windows, macos or any linux distro such as changing directories and listing directories content, this will help you in learning git. You can start learning Command Line Basics from &lt;a href="https://www.youtube.com/watch?v=uwAqEzhyjtw&amp;amp;t=120s" rel="noopener noreferrer"&gt;Traversy Media’s Youtube channel&lt;/a&gt;&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Learn Version Control (GIT)&lt;/strong&gt; : Git is a very popular version control system and Github allows you to upload, host and manage your code using Git. Start with setting up the Git in your system, read &lt;a href="https://git-scm.com/book/en/v2/Getting-Started-Installing-Git" rel="noopener noreferrer"&gt;here &lt;/a&gt; and create your account on &lt;a href="http://github.com" rel="noopener noreferrer"&gt;Github&lt;/a&gt;. Start with learning about repositories, snapshots, commits and branches on &lt;a href="https://www.youtube.com/@chaiaurcode" rel="noopener noreferrer"&gt;Chai aur Code Youtube channel&lt;/a&gt; by Hitesh Chaudhary&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Essential Skills and Roadmap
&lt;/h3&gt;

&lt;p&gt;To become a successful frontend developer, you need to master a variety of skills. Here’s a roadmap to guide you through your learning journey:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;HTML (Hyper Text Markup Language)&lt;/strong&gt; : HTML is the backbone of a website, it provides the structure of a webpage, website or a web app&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Foundational topics to learn : 

&lt;ul&gt;
&lt;li&gt;Elements and tags&lt;/li&gt;
&lt;li&gt;HTML boilerplate&lt;/li&gt;
&lt;li&gt;Lists&lt;/li&gt;
&lt;li&gt;Links and Images and more&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;From where to learn : &lt;a href="https://www.youtube.com/@freecodecamp" rel="noopener noreferrer"&gt;Freecodecamp Youtube Channel&lt;/a&gt; has complete tutorial or you can learn from &lt;a href="https://www.w3schools.com/" rel="noopener noreferrer"&gt;W3Schools&lt;/a&gt;
&amp;amp;nbps;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;CSS (Cascading Style Sheets)&lt;/strong&gt; : CSS is used to style and layout the web pages, making them visually appealing and beautiful&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Foundational topics to learn : 

&lt;ul&gt;
&lt;li&gt;The Box Model&lt;/li&gt;
&lt;li&gt;Block and Inline Elements&lt;/li&gt;
&lt;li&gt;Complete Flexbox&lt;/li&gt;
&lt;li&gt;Positioning&lt;/li&gt;
&lt;li&gt;Media Queries&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;From where to learn : &lt;a href="https://www.youtube.com/@freecodecamp" rel="noopener noreferrer"&gt;Freecodecamp Youtube channel&lt;/a&gt; or from &lt;a href="https://www.youtube.com/@KevinPowell" rel="noopener noreferrer"&gt;Kevin Powell Youtube Channel&lt;/a&gt;
&amp;amp;nbps;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Javascript&lt;/strong&gt; : Javascript brings interactivity to your websites, enabling features like manipulating DOM (structure of your website), using event listeners, dynamic animations and more&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Foundational topics to learn : 

&lt;ul&gt;
&lt;li&gt;Variables and Operators&lt;/li&gt;
&lt;li&gt;Data types and Conditionals&lt;/li&gt;
&lt;li&gt;Developer Tools&lt;/li&gt;
&lt;li&gt;Functions and Errors&lt;/li&gt;
&lt;li&gt;DOM Manipulation&lt;/li&gt;
&lt;li&gt;Basics of Objects&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;From where to learn :  Learn from official &lt;a href="https://developer.mozilla.org/en-US/" rel="noopener noreferrer"&gt;MDN Web Docs&lt;/a&gt; or &lt;a href="https://www.youtube.com/@akshaymarch7" rel="noopener noreferrer"&gt;Akshay Saini Youtube channel&lt;/a&gt;
 &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Framework and Libraries&lt;/strong&gt; : Framework and Libraries helps to build the website or web app in a more efficient and faster way. Now, you can choose what you want to learn from popular frontend frameworks/libraries like Reactjs and Vuejs and for CSS you can learn TailwindCSS or SASS.&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Package Managers and Build Tools : Learn how to use package managers like npm and yarn in order to manage your advanced projects made with popular Frameworks and Libraries, from downloading external packages into your project to deploying it live, a package manager will help you completely.&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Testing&lt;/strong&gt; : Testing your code is a crucial skill to learn. Learn how to use different testing methods such as unit testing and end-to-end testing with tools like Jest, Mocha, Vitest and more&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Junior Role&lt;/strong&gt; : You should find an intern or Junior Frontend Role to fasten up the learning process. Internships help in learning because when you implement your skills on a live project, you gain hands-on experience which is invaluable.&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Important Tip : Make sure to build projects at every stage. Such as create some static web pages with HTML and CSS then start with Javascript. After completing Javascript, build some projects. When you are comfortable then continue with frameworks and again build projects and keep repeating.&lt;/p&gt;

&lt;p&gt;For more detailed roadmap, check &lt;a href="https://roadmap.sh/frontend" rel="noopener noreferrer"&gt;here &lt;/a&gt;&lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  Joining Developer Communities
&lt;/h3&gt;

&lt;p&gt;Being a part of the developer community can offer you support, inspiration  and networking opportunities. After learning or while you are learning frontend development, you can start engaging in these communities to learn and share your knowledge. Let’s see some of the popular communities for developers:&lt;br&gt;
 &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Github&lt;/strong&gt;: Contribute to open source projects and collaborate with other developers. Github works as the proof of work in most of the interviews and it does showcase your level of skills, sense of committing code, merging PR’s etc&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Stack Overflow&lt;/strong&gt; : Ask questions and share knowledge with a global community of developers. It's one of the most popular community of developers where you can find answers to most of the doubts and if you the answer then you can share it with the world&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reddit&lt;/strong&gt; : Engage in discussions and stay updated on the latest trends. Reddit is growing at a rapid pace in the technical and coding domain. &lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Discord Communities&lt;/strong&gt; : Join coding focused channels and collaborate with peers. Most Youtubers have their own Discord Channels where you can connect with them one on one. You can ask your doubts or help someone with their doubts as well. &lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Learning frontend development is a journey that blends motivation, mindset and methodical practice. By staying connected to your reasons for learning, maintaining a growth mindset and embracing both focused learnings and breaks, you will build a strong foundation. Remember, practice through projects and teaching what you have learned are key to mastering the skills you need. Keep pushing forward, celebrate your progress, and know that every challenge you overcome brings you one step closer to your goals&lt;/p&gt;

&lt;p&gt;A huge inspiration for this article is The Odin Project Foundation Course, check &lt;a href="https://www.theodinproject.com/paths/foundations/courses/foundations" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Will AI Replace Programmers ?</title>
      <dc:creator>Team Dualite</dc:creator>
      <pubDate>Sat, 17 Aug 2024 16:58:53 +0000</pubDate>
      <link>https://forem.com/dualite/will-ai-replace-programmers--5e66</link>
      <guid>https://forem.com/dualite/will-ai-replace-programmers--5e66</guid>
      <description>&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%2Fpoc2wchcg7lqh8btzk4i.jpeg" 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%2Fpoc2wchcg7lqh8btzk4i.jpeg" alt="Will AI Replace Programmers ?" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The first reaction of a developer when they hear about Dualite has always been will AI replace programmers and whether they’re gonna lose their jobs ? &lt;/p&gt;

&lt;p&gt;And the answer is NO. Just as calculators didn’t make mathematicians lose their jobs, but only made their work faster, Dualite is a tool for developers to catalyze their stressful development work by automating the repetitive task of manually coding UI designs from a Figma file to code through the power of AI. &lt;/p&gt;

&lt;p&gt;We believe developers won't be replaced by AI, but those who don't use AI-driven tools will fall behind significantly. With Dualite our mission is to empower developers to build faster and better, and truly focus on the things that really matter, for there’s no substitute in any LLM model or GPT for Human intelligence.&lt;/p&gt;

&lt;p&gt;That being said, there are still larger consequences to be aware off and plan cautiously, something which we’ll discuss &lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Moving to a higher ground&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you were building toys as a laborer in a factory 50 years back, you probably could’ve made 100-150 toys per day. But now, a machine can probably produce 5000 in the same timeframe. &lt;/p&gt;

&lt;p&gt;On an immediate note you might think that your core job has been automated. The task of 5000/100 = 50 workers to be precise has now been replaced by a single machine. But if you look at it from a different perspective, a person who now sits at the operation panel, controlling the same machine, earns significantly more per day in comparison to if he was a working laborer. &lt;/p&gt;

&lt;p&gt;So just like the emergence of a machine resulted in the demand of more skilled operators and technicians who are much more prosperous, the advancement in AI-based technologies will only allow far greater productivity and therefore better compensations.&lt;/p&gt;

&lt;p&gt;The idea of job replacement is very much true. But the definition of work itself has changed. We’re moving to an age wherein even with very small efforts, we can generate a much higher compensation.&lt;/p&gt;

&lt;p&gt;Furthermore, this shift from traditional linear work systems, i.e, you’re compensated based on the hours you put in, is slowly shifting to a nonlinear one wherein a skilled worker with minimum input you can get significantly higher output, and therefore higher compensation.&lt;/p&gt;

&lt;p&gt;Today’s designers and artists leverage AI products like &lt;a href="https://www.midjourney.com/" rel="noopener noreferrer"&gt;Midjourney &lt;/a&gt;and tools to quickly get from idea to product with just a few prompts. The prompt writing itself now has become a skill which few people have leveraged to get high-quality outputs. And the final touches or finishing still need manual intervention and refinement. &lt;/p&gt;

&lt;p&gt;Similarly, software development cycles are going to get transformed where people use AI coding tools and prompts to fix bugs, automate repetitive tasks like &lt;a href="https://www.dualite.dev/" rel="noopener noreferrer"&gt;UI development&lt;/a&gt; and build a better and cleaner documentation. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;You can read more about these nonlinear work systems &lt;a href="https://visualizevalue.com/blogs/feed/the-age-of-infinite-leverage" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;But purely looking at it through a macro-economic lens, the other 49 people who lost their job due to a lack of education in operating a toy machine face challenges and difficulty. Thus, we have to aggressively integrate these new-age technologies in our learning systems and institutions so that this lack of awareness does not lead to inequality. &lt;/p&gt;

&lt;p&gt;People like Musk also suggested the introduction of a universal basic income due to the potential of technology to create inequality by concentrating huge wealth in the hands of a few. He further argues that a harder social challenge would be to give meaning to people’s lives since a lot of people derive purpose and a sense meaning from their work.&lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;When’s the Terminator coming for us&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The next question probably comes of whether AI has achieved human, or even beyond human intelligence.&lt;/p&gt;

&lt;p&gt;ChatGPT is a great natural language search engine, and an incredible translator from computer languages to human languages. It can extrapolate and scale up a paragraph from a single sentence, but distilling down to core things and explaining something to the core, which is a sign of true intelligence, it falls apart.&lt;/p&gt;

&lt;p&gt;Secondly if you give it anything outside its training set, it’ll fall apart and not actually reason through it. A great example was on Twitter wherein a user asked “There are two knights - they’re both telling the truth. How do you find out which one is telling the truth?” A simple answer was just asking any one of them. But because ChatGPT was trained on a dataset of zillions of examples of the famous two knights problem, where one is lying and the other is telling the truth, it couldn’t simply ‘think’ beyond that and went through a convoluted process and couldn’t do simple rational reasoning that even a 5 year old could have.&lt;/p&gt;

&lt;p&gt;Thus, the right question is whether AGI - Artificial General intelligence as it is known - has well and truly arrived. An actual conscious machine which can critically think, reason, and rational. That is actually concerning. &lt;br&gt;
 &lt;/p&gt;

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

&lt;p&gt;But practically speaking, the complexity and the layered nature of the world we live in, the current technologies can expand more and more and become more knowledgeable, but will never be able to sufficiently compensate for its lack of understanding. Sure, within specified, well-defined use-cases and domains, it can certainly exceed human abilities in the way that a calculator exceeds an average human’s math capabilities. &lt;/p&gt;

&lt;p&gt;Understanding and grasping something is fundamentally standing on top of knowledge and digging deep into it. AI might spit out a definition of “love”, but it truly can never understand the depth and gravity of it that we all humans do.&lt;br&gt;
 &lt;/p&gt;

&lt;p&gt;To know more about Dualite, check our official website &lt;a href="https://www.dualite.dev/" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programmers</category>
      <category>chatgpt</category>
    </item>
    <item>
      <title>Top AI Tools to 10x your Startup Growth</title>
      <dc:creator>Team Dualite</dc:creator>
      <pubDate>Sat, 17 Aug 2024 16:54:00 +0000</pubDate>
      <link>https://forem.com/dualite/top-ai-tools-to-10x-your-startup-growth-1f8</link>
      <guid>https://forem.com/dualite/top-ai-tools-to-10x-your-startup-growth-1f8</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwimjhjd6fg5gxgg8ygtb.jpeg" 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%2Fwimjhjd6fg5gxgg8ygtb.jpeg" alt="Top AI Tools to 10x your Startup Growth"&gt;&lt;/a&gt;&lt;br&gt;
 &lt;/p&gt;

&lt;p&gt;In today’s fast paced development environment, staying ahead means leveraging tools that can drastically improve efficiency. Artificial Intelligence (AI) is increasingly being integrated into development and designing, offering solutions that save time, reduce errors and streamline the workflow. Here are some top AI Tools to 10x your startup growth.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. Coding Assistant&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/features/copilot" rel="noopener noreferrer"&gt;Github Copilot&lt;/a&gt; : GitHub Copilot is an AI coding assistant that is a global benchmark. It helps you write code faster and with less effort, allowing you to focus more energy on problem solving and collaboration. GitHub Copilot has been proven to increase developer productivity and accelerate the pace of software development.&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%2Frbd9nr4gnk8ogoq7ozca.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%2Frbd9nr4gnk8ogoq7ozca.png" alt="Github Copilot"&gt;&lt;/a&gt;&lt;br&gt;
 &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://codemate.ai/" rel="noopener noreferrer"&gt;CodeMate&lt;/a&gt; : CodeMate is an AI powered coding assistant designed to enhance user productivity by assisting in various programming tasks. CodeMate is not just a code generator but it understands the context of the codebase, helps in debugging, code optimization and much more. Its main USP is that it can handle multiple repositories. &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%2Fc740hnfu23t9qx4xk16b.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%2Fc740hnfu23t9qx4xk16b.png" alt="CodeMate"&gt;&lt;/a&gt;&lt;br&gt;
 &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://chat.openai.com" rel="noopener noreferrer"&gt;ChatGPT&lt;/a&gt; : ChatGPT is an advanced AI language model created by Open AI. It’s designed to understand questions and generate responses that feel natural, as if you’re chatting with another person. For instance, if a developer asks chatGPT “How do I fix CORS errors ?”, it won’t just provide technical explanations but it will also offer clear solutions in a conversational way that makes complex concepts easier to grasp.&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%2Fg45e2m2f6il2wiii03rn.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%2Fg45e2m2f6il2wiii03rn.png" alt="ChatGPT"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2. Frontend Automation Tools&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.dualite.dev/" rel="noopener noreferrer"&gt;Dualite&lt;/a&gt; : Dualite is an AI powered Figma plugin designed to convert Figma designs to clean, reusable code. It supports React, HTML/CSS, TailwindCSS etc. It comes with exciting features like Component Mode, Page Mode, Code Tagging and seamless animation to code conversion which makes it different from others.&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%2F821yhj0p8jj5fcrk7tiq.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%2F821yhj0p8jj5fcrk7tiq.png" alt="Dualite"&gt;&lt;/a&gt;&lt;br&gt;
 &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.locofy.ai/" rel="noopener noreferrer"&gt;Locofy&lt;/a&gt; : Locofy.ai is a low-code platform that allows you to turn your designs into production-ready frontend code for mobile apps and web. It uses artificial intelligence to generate clean and customizable code that matches your design specifications.&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%2Fbh2qh98pho0woj0qygek.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%2Fbh2qh98pho0woj0qygek.png" alt="Locofy"&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
 &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.builder.io/" rel="noopener noreferrer"&gt;Builder&lt;/a&gt; : Builder lets you accelerate your digital teams with AI-powered design-to-code, visual editing, and enterprise CMS, all in Visual Development Platform.&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%2F156a9ox39x9l2rvl6qiq.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%2F156a9ox39x9l2rvl6qiq.png" alt="Builder"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3. Documentation&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://DocuWriter.ai" rel="noopener noreferrer"&gt;DocuWriter&lt;/a&gt; : DocuWriter.ai utilizes artificial intelligence to analyze source code and produce useful outputs like documentation, test suites, and optimized code. The goal is to streamline development workflows using automation to minimize the time while development.&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%2Fobn77pikpznluljb542r.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%2Fobn77pikpznluljb542r.png" alt="Docuwriter"&gt;&lt;/a&gt;&lt;br&gt;
 &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://docify.ai4code.io/" rel="noopener noreferrer"&gt;Docify&lt;/a&gt; : Docify AI is an automated code comment generator and documentation tool that helps Software Developers improve code quality, save time and increase productivity. It is a available on major IDE’s such as VSCode, IntelliJ and more&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%2F1sdfy09qskrnarrzfkyc.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%2F1sdfy09qskrnarrzfkyc.png" alt="Docify"&gt;&lt;/a&gt;&lt;br&gt;
 &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.eraser.io/diagramgpt" rel="noopener noreferrer"&gt;DiagramGPT&lt;/a&gt; : DiagramGPT is a free AI-based unique web app that converts a schema, infrastructure definition, code snippet or plain language description into diagrams. The tool can generate flow charts, entity relationship diagrams, cloud architecture diagrams and sequence diagrams.&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%2F0fcbky3ecjgrmcxq2w65.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%2F0fcbky3ecjgrmcxq2w65.png" alt="DiagramGPT"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;4. Testing&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://snyk.io/" rel="noopener noreferrer"&gt;Snyk&lt;/a&gt; : Snyk AI is a feature within Snyk platform, which leverages Artificial Intelligence to enhance its capabilities in helping developers secure their code, dependencies, container, testing and infrastructure as code. It provides intelligent security insights, vulnerability fixes and improve developer productivity.&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%2Fvwxtpgwwmhe1g2blilyi.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%2Fvwxtpgwwmhe1g2blilyi.png" alt="Snyk"&gt;&lt;/a&gt;&lt;br&gt;
 &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.codium.ai/" rel="noopener noreferrer"&gt;Codium&lt;/a&gt; : Codium AI is a tool designed to assist developers by automatically generating and suggesting unit tests for their code. It uses AI to understand existing code and create relevant test cases, helping to ensure code quality.&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%2Fn55abi7n099hygr0gvro.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%2Fn55abi7n099hygr0gvro.png" alt="Codium"&gt;&lt;/a&gt;&lt;br&gt;
 &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.octomind.dev/" rel="noopener noreferrer"&gt;Octomind&lt;/a&gt; : Octomind is an AI powered testing platform designed to automate the testing of web applications. It simplifies the process by automatically discovering, generating and running test cases without any human intervention.&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%2Fxriqqx5ptnwy0mddtw2a.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%2Fxriqqx5ptnwy0mddtw2a.png" alt="Octomind"&gt;&lt;/a&gt;      &lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;5. UI/UX Designers&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://figr.design/" rel="noopener noreferrer"&gt;Figr.design&lt;/a&gt; : Figr is an AI powered platform designed to help users brainstorm, ideate and design user interfaces (UI) for their products. It simplify the UI design process, enabling designers and developers to quickly create, customize and export responsive designs&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%2F8nnqulehdukdxk2g90cr.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%2F8nnqulehdukdxk2g90cr.png" alt="Figr"&gt;&lt;/a&gt;&lt;br&gt;
 &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://uizard.io/" rel="noopener noreferrer"&gt;Uizard&lt;/a&gt; : Uizard is the AI-powered product design platform for product teams. It helps in turning ideas into design proposals and interactive prototypes in minutes and handoff to your development team with smart export options as well.&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%2Fqdduhjwfs8w8sak3xwla.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%2Fqdduhjwfs8w8sak3xwla.png" alt="Uizard"&gt;&lt;/a&gt;&lt;br&gt;
 &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.boringui.xyz/" rel="noopener noreferrer"&gt;BoringUI&lt;/a&gt; : BoringUI is a tool designed to generate User Interfaces automatically from provided json data. It is especially helpful for those who need quick UI prototypes or for users who may not have strong design skills.&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%2Fatelp632s19hm42vy5ac.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%2Fatelp632s19hm42vy5ac.png" alt="BoringUI"&gt;&lt;/a&gt;&lt;br&gt;
 &lt;/p&gt;

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

&lt;p&gt;AI-powered tools are reshaping the landscape of development, offering multiple levels of efficiency and innovation. From accelerating code completion and converting designs into production-ready code to automating documentation and testing, these tools are not just enhancing productivity but also empowering developers and designers to focus on more strategic and creative aspects of their projects. By integrating these AI tools into your workflow, you can streamline your development process, reduce manual errors and ultimately     drive your startup’s growth to new heights.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>chatgpt</category>
    </item>
    <item>
      <title>Building Forms in React.js : A beginners guide</title>
      <dc:creator>Team Dualite</dc:creator>
      <pubDate>Sat, 17 Aug 2024 16:33:25 +0000</pubDate>
      <link>https://forem.com/dualite/building-forms-in-reactjs-a-beginners-guide-11k1</link>
      <guid>https://forem.com/dualite/building-forms-in-reactjs-a-beginners-guide-11k1</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft730vjp07t45f49fnyfz.jpeg" 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%2Ft730vjp07t45f49fnyfz.jpeg" alt="Building Forms"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Forms are integral to web applications, enabling user interaction and data collection. In React.js, building forms involves using state management and component-driven architecture to ensure efficiency and maintainability. This guide will cover best practices for building forms in React.js, making your application robust and user-friendly.&lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. Use Controlled Components&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt; &lt;br&gt;
    Controlled components are the preferred way to handle form inputs in React. They keep form data in the component state, making it easier to manage and validate.&lt;br&gt;
 &lt;br&gt;
    Store all the form input values in a state. Create an object and map all the input with their property in the state, Example below&lt;/p&gt;

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

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;MyForm&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;


  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;formData&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setFormData&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;handleChange&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nf"&gt;setFormData&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;formData&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;handleSubmit&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;preventDefault&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;formData&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;form&lt;/span&gt; &lt;span class="nx"&gt;onSubmit&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;handleSubmit&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt; &lt;span class="nx"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;text&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;formData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;     &lt;span class="nx"&gt;onChange&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;handleChange&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt; &lt;span class="nx"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;email&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;email&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;formData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;     &lt;span class="nx"&gt;onChange&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;handleChange&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt; &lt;span class="nx"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;submit&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Submit&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/button&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/form&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;MyForm&lt;/span&gt;



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

&lt;/div&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;2. Error Handling&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt; &lt;br&gt;
    Error Handling and Validation is an important part of a form. You must validate and check for errors for every value entered by user and handle all the cases such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Getting null/undefined&lt;/li&gt;
&lt;li&gt;Getting empty value&lt;/li&gt;
&lt;li&gt;Invalid Data Type etc&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Must implement client-side validation to enhance user experience and reduce server load which eventually improves the performance. Utilize libraries like Yup or custom validation logic to ensure data integrity.&lt;/p&gt;

&lt;p&gt;Lets see, how to implement custom validation logic&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;validate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;formData&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;errors&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{};&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;formData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nx"&gt;errors&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Name is required&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;formData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nx"&gt;errors&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Email is required&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;errors&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;MyForm&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;formData&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setFormData&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;errors&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setErrors&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&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;handleSubmit&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;preventDefault&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;validationErrors&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;validate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;formData&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;keys&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;validationErrors&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;length&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="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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;formData&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;setErrors&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;validationErrors&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;form&lt;/span&gt; &lt;span class="nx"&gt;onSubmit&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;handleSubmit&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt; &lt;span class="nx"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;text&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;formData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;onChange&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;handleChange&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;errors&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;span&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;errors&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/span&amp;gt;&lt;/span&gt;&lt;span class="err"&gt;}
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt; &lt;span class="nx"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;email&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;email&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;formData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;onChange&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;handleChange&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;errors&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;span&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;errors&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/span&amp;gt;&lt;/span&gt;&lt;span class="err"&gt;}
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt; &lt;span class="nx"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;submit&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Submit&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/button&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/form&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;



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

&lt;/div&gt;

&lt;p&gt; &lt;br&gt;
For ease of work, you must use Yup package to smoothly Validate the form data. It is a very popular package used with Form Libraries like React-Hook-Form or Formik.&lt;br&gt;
Yup Docs: &lt;a href="https://www.npmjs.com/package/yup" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/yup&lt;/a&gt;&lt;br&gt;
 &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3. Leverage Third-Party Libraries&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt; &lt;br&gt;
    Libraries like Formik and React Hook Form simplify form management, offering powerful features out of the box and making easy for developers to build and validate forms in more scalable and flexible way&lt;/p&gt;

&lt;p&gt;Using Formik:&lt;/p&gt;

&lt;p&gt;Docs :- &lt;a href="https://formik.org/docs/overview" rel="noopener noreferrer"&gt;https://formik.org/docs/overview&lt;/a&gt;&lt;/p&gt;

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

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;ReactDOM&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react-dom&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Formik&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Field&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Form&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;formik&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;


&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;BasicForm&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
   &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; 
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;h1&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Sign&lt;/span&gt; &lt;span class="nx"&gt;Up&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/h1&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Formik&lt;/span&gt;
      &lt;span class="nx"&gt;initialValues&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt;
      &lt;span class="na"&gt;firstName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;lastName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;}}&lt;/span&gt;


  &lt;span class="nx"&gt;onSubmit&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;values&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
    &lt;span class="nf"&gt;alert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;values&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="p"&gt;}}&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Form&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;label&lt;/span&gt; &lt;span class="nx"&gt;htmlFor&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;firstName&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;First&lt;/span&gt; &lt;span class="nx"&gt;Name&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/label&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Field&lt;/span&gt; &lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;firstName&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;firstName&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;placeholder&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Jane&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;


    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;label&lt;/span&gt; &lt;span class="nx"&gt;htmlFor&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;lastName&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Last&lt;/span&gt; &lt;span class="nx"&gt;Name&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/label&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Field&lt;/span&gt; &lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;lastName&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;lastName&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;placeholder&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Doe&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;


    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;label&lt;/span&gt; &lt;span class="nx"&gt;htmlFor&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;email&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Email&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/label&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Field&lt;/span&gt;
    &lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;email&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;email&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="nx"&gt;placeholder&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;jane@acme.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="nx"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;email&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
   &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt; &lt;span class="nx"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;submit&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Submit&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/button&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Form&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Formik&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;


&lt;span class="nx"&gt;ReactDOM&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;BasicForm&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;root&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;



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

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://formik.org/docs/examples/basic" rel="noopener noreferrer"&gt;Click to check live Formik Demo&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt; &lt;br&gt;
Building forms in React.js can be straightforward and efficient by following these best practices. Use controlled components for state management, validate inputs thoroughly, leverage third-party libraries, enhance UX with proper styling, and optimize performance to create responsive and robust forms.&lt;br&gt;
By adhering to these guidelines, you can ensure your forms are reliable, user-friendly, and maintainable, providing a seamless experience for users and developers alike.&lt;br&gt;
 &lt;/p&gt;

&lt;p&gt;To know more about Dualite, check our official website &lt;a href="https://www.dualite.dev/" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>developer</category>
      <category>programming</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
