<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: rardooba</title>
    <description>The latest articles on DEV Community by rardooba (@rardooba).</description>
    <link>https://dev.to/rardooba</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%2F895188%2F3a022016-5197-4412-bd27-6051904f42fb.png</url>
      <title>DEV Community: rardooba</title>
      <link>https://dev.to/rardooba</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rardooba"/>
    <language>en</language>
    <item>
      <title>Code, Kids, and Chaos: A Developer Dad's Journey</title>
      <dc:creator>rardooba</dc:creator>
      <pubDate>Fri, 31 Mar 2023 06:30:00 +0000</pubDate>
      <link>https://dev.to/rardooba/code-kids-and-chaos-a-developer-dads-journey-3pci</link>
      <guid>https://dev.to/rardooba/code-kids-and-chaos-a-developer-dads-journey-3pci</guid>
      <description>&lt;p&gt;Living as a coder and a dad of two kids can seem like a daunting challenge. But for me, it's just a joyful chaos that brings me a lot of fulfillment.&lt;/p&gt;

&lt;p&gt;As a re-careered front-end developer, I'm constantly learning and discovering new technologies. However, my two kids provide a welcome distraction that helps me maintain balance in my life. I'm passionate about code, but I'm also deeply in love with my kids.&lt;/p&gt;

&lt;p&gt;The biggest challenge I face as a coding dad is finding a balance between my work hours and my children's homework. &lt;br&gt;
I have set up a system to remedy this: &lt;strong&gt;weekends&lt;/strong&gt; are devoted to the family, and from &lt;strong&gt;18:00&lt;/strong&gt; every weeknight, all screens are turned off. This gives us enough time to focus on my children's homework.&lt;/p&gt;

&lt;p&gt;Despite my efforts to balance things out, sometimes my programming habits interfere with my teaching during homework. I need to be aware of not speaking in technical terms with them, which can discourage them. Instead, I strive to use a &lt;strong&gt;positive educational approach&lt;/strong&gt;, encouraging them to find solutions on their own and congratulating them on their effort and perseverance.&lt;/p&gt;

&lt;p&gt;I've also learned to reward myself to stay motivated in my code learning. I dedicate an hour a day to a personal project that I'm passionate about and that allows me to flourish outside of my family obligations. This gives me the feeling of fulfilling my dreams while being a loving dad to my kids.&lt;/p&gt;

&lt;p&gt;In the end, being a coder and a dad is not always easy, but it is certainly an exciting adventure. I am grateful for the love and support of my family, without which I could not balance my passion for code with my life as a dad. And that's what matters most to me in the end.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>lifestyle</category>
      <category>career</category>
    </item>
    <item>
      <title>10 Tips for Making Your Website Accessible in 2021</title>
      <dc:creator>rardooba</dc:creator>
      <pubDate>Wed, 29 Mar 2023 06:30:00 +0000</pubDate>
      <link>https://dev.to/rardooba/10-tips-for-making-your-website-accessible-in-2021-528k</link>
      <guid>https://dev.to/rardooba/10-tips-for-making-your-website-accessible-in-2021-528k</guid>
      <description>&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use descriptive and meaningful HTML headings&lt;/strong&gt;: The headings help users navigate the page and provide context for the content. Use H1 for the main heading and H2 to H6 for subheadings, in a hierarchical order.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Provide alt-text for images&lt;/strong&gt;: Alt-text allows users with visual impairments to understand what the image is about. Make sure the text accurately describes the image and provides context for it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Make sure your website is keyboard accessible&lt;/strong&gt;: Allow users to interact with the site using only the keyboard. This includes providing clear focus indicators, allowing users to tab through links and form elements, and ensuring that dropdown menus and modal windows are accessible.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use appropriate color contrast&lt;/strong&gt;: Ensure that the text and background colors have enough contrast so that users with color blindness or low vision can see and understand the content.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use clear and simple language&lt;/strong&gt;: Avoid using technical jargon and make sure the text is easy to read and understand. This includes using clear font sizes, styles, and colors.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Provide transcriptions for audio and video content&lt;/strong&gt;: This allows users with hearing impairments to access and understand the content.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Make sure your website is responsive&lt;/strong&gt;: Ensure that the site adjusts to different screen sizes and orientations, making it accessible on a variety of devices.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Provide captions and subtitles for videos&lt;/strong&gt;: Captions allow users with hearing impairments to understand the audio content and subtitles provide support for users with language disabilities.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Allow users to adjust the text size&lt;/strong&gt;: Provide an option for users to adjust the text size to meet their individual needs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Test and monitor accessibility&lt;/strong&gt;: Regularly test the site for accessibility issues and use tools to monitor accessibility, such as accessibility checkers and screen readers. Make sure to address any issues that are found and make updates as necessary to ensure that the site is accessible to everyone.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;By following these best practices, you can ensure that your website is accessible to a wide range of users, including those with disabilities. This not only meets the requirements of accessibility laws, but it also helps create a more inclusive and user-friendly experience for everyone.&lt;/p&gt;

&lt;p&gt;And that's it ! See U next level Doobs !&lt;/p&gt;

</description>
      <category>a11y</category>
      <category>webdev</category>
      <category>rgaa</category>
      <category>programming</category>
    </item>
    <item>
      <title>Conquering the Beast: My Battle with the Complex Recursive Algorithm</title>
      <dc:creator>rardooba</dc:creator>
      <pubDate>Mon, 27 Mar 2023 06:30:00 +0000</pubDate>
      <link>https://dev.to/rardooba/conquering-the-beast-my-battle-with-the-complex-recursive-algorithm-10gf</link>
      <guid>https://dev.to/rardooba/conquering-the-beast-my-battle-with-the-complex-recursive-algorithm-10gf</guid>
      <description>&lt;p&gt;Recursion is a powerful concept in computer programming that involves breaking down a problem into smaller, more manageable parts. This approach can be particularly useful for solving complex problems, as it allows developers to build solutions incrementally, starting from the simplest cases and gradually adding more complexity.&lt;/p&gt;

&lt;p&gt;One of the most complex recursive algorithms in JavaScript (&lt;em&gt;or TypeScript&lt;/em&gt;) is known as &lt;strong&gt;the Towers of Hanoi&lt;/strong&gt;. This algorithm is a classic example of recursive problem solving and is often used to demonstrate the power and versatility of this programming technique.&lt;/p&gt;

&lt;p&gt;The Towers of Hanoi is a mathematical puzzle that involves moving a series of disks of different sizes from one peg to another, while following a set of rules. The rules are as follows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Only one disk can be moved at a time.&lt;/li&gt;
&lt;li&gt;A disk can only be moved to an empty peg or onto a disk that is larger than it.&lt;/li&gt;
&lt;li&gt;The entire sequence of disks must be moved to the target peg in order to solve the puzzle.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To implement the Towers of Hanoi algorithm in JavaScript or TypeScript, we will first define a function that will represent the "move" operation. This function will take three parameters: the source peg, the target peg, and the disk size.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;move&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;source&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&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="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;disk&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Move disk &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;disk&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; from peg &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;source&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; to peg &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="s2"&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;Next, we will define the main recursive function that will solve the Towers of Hanoi puzzle. This function will take four parameters: the number of disks, the source peg, the auxiliary peg, and the target peg.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;hanoi&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;source&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;aux&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&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="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;n&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="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nx"&gt;hanoi&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;source&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="nx"&gt;aux&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;move&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;source&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="nx"&gt;n&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;hanoi&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;aux&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;source&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="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The logic of this function is simple. First, it checks to see if the number of disks is zero. If it is, there is nothing left to do, so the function returns. If not, the function first calls itself with the number of disks decremented by one, moving the top n-1 disks from the source peg to the auxiliary peg. Then it calls the move function to move the nth disk from the source peg to the target peg. Finally, it calls itself again with the number of disks decremented by one, moving the n-1 disks from the auxiliary peg to the target peg.&lt;/p&gt;

&lt;p&gt;To use this algorithm, we simply call the hanoi function with the number of disks and the source, auxiliary, and target peg numbers.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;hanoi&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will output the following sequence of moves:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Move disk 1 from peg 1 to peg 3
Move disk 2 from peg 1 to peg 2
Move disk 1 from peg 3 to peg 2
Move disk 3 from peg 1 to peg 3
Move disk 1 from peg 2 to peg 1
Move disk 2 from peg 2 to peg 3
Move disk 1 from peg 1 to peg 3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The beauty of this algorithm is its simplicity and elegance. Despite its complexity, the logic behind it is straightforward and easy to understand. This makes it an excellent example of a complex algorithm that demonstrates the power and flexibility of recursive functions.&lt;/p&gt;




&lt;p&gt;This algorithm is not easy to understand at first. I had to struggle to understand it. Thanks to &lt;a href="https://www.thearenaproject.co/"&gt;TheArenaProject&lt;/a&gt; who provided me with the tools to tackle the principles of recursion. I recommend joining the ranks of TheArenaProject Gladiators Doobs !&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>algorithms</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Security with smile: Implementing Strict Access Control on your API</title>
      <dc:creator>rardooba</dc:creator>
      <pubDate>Wed, 22 Mar 2023 07:30:00 +0000</pubDate>
      <link>https://dev.to/rardooba/security-with-smile-implementing-strict-access-control-on-your-api-103i</link>
      <guid>https://dev.to/rardooba/security-with-smile-implementing-strict-access-control-on-your-api-103i</guid>
      <description>&lt;p&gt;&lt;strong&gt;API attacks&lt;/strong&gt; are a growing threat to businesses, and many are unaware of the possibility of being targeted. This is due to a lack of understanding of API security and how a poorly implemented API can cause harm. In this article, we will explore the different types of API attacks and ways to prevent them.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is an API attack and how does it work?
&lt;/h2&gt;

&lt;p&gt;An application programming interface (API) is a tool within a software program that facilitates connections between applications. The API makes communication between applications possible through the use of various tools, routines, and protocols. The web API enables the application to communicate with other services and platforms. However, like all software, APIs can be hacked, and they are becoming increasingly vulnerable to attacks.&lt;/p&gt;

&lt;p&gt;API attacks usually involve accessing information regarding the implementation methods and structure of the API. When a hacker gains access to this information, they can use it to launch cyberattacks. Attackers typically look for different security vulnerabilities in the API, such as unencrypted data, poor authentication, and more. What makes API attacks challenging is that they can vary greatly, making them difficult to detect. That's why it's important to be aware of the most common types of API attacks and how they work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Common API attacks&lt;/strong&gt;&lt;br&gt;
API documentation often includes information about the structure and implementation methods. Hackers can use this information to launch attacks. Other security vulnerabilities, such as poor authentication and unencrypted data, can also be exploited. Here are some of the most common types of API attacks:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DDoS attacks&lt;/strong&gt;&lt;br&gt;
This is probably the most common type of API attack. A distributed denial of service (DDoS) attack involves multiple systems flooding the bandwidth of the target system. A DDoS attack on a web API tries to overwhelm its memory by inundating it with thousands of connections at once. Hackers can also achieve this by sending a large amount of information in each request.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Man-in-the-Middle (MITM) attack&lt;/strong&gt;&lt;br&gt;
An MITM attack is exactly what it sounds like: an attacker relays, modifies, and discreetly intercepts communications, messages, and data between two systems. This type of attack can be carried out by a hacker who has access to the same network as the target. The hacker can then modify or steal sensitive information, such as login credentials, during the attack.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SQL injection attack&lt;/strong&gt;&lt;br&gt;
SQL injection attacks are a type of attack that targets databases and involves the injection of malicious code into SQL statements. This type of attack is carried out by exploiting vulnerabilities in the database, such as weak authentication or insufficient data validation. Once the attacker gains access to the database, they can extract sensitive information or modify it.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to reventing API attacks ?
&lt;/h2&gt;

&lt;p&gt;Preventing API attacks requires a multi-layer approach that includes regular monitoring and testing, proper authentication and encryption, and strict access control. Here are some ways to prevent API attacks:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Implement encryption&lt;/strong&gt;&lt;br&gt;
Encrypting sensitive data, such as login credentials and other personal information, is an effective way to prevent data theft. This can be achieved through the use of SSL/TLS certificates, which provide a secure connection between the client and server.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Implement proper authentication&lt;/strong&gt;&lt;br&gt;
Proper authentication is essential in preventing unauthorized access to the API. This can be achieved through the use of access tokens, secure passwords, and two-factor authentication.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Monitor and test regularly&lt;/strong&gt;&lt;br&gt;
Monitoring and testing the API on a regular basis can help identify vulnerabilities before they are exploited by attackers. This can be done through automated testing tools and regular penetration testing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Implement strict access control&lt;/strong&gt;&lt;br&gt;
Strict access control is important in ensuring that only authorized users have access to the API. This can be achieved through the use of access control lists, role-based access control, and authentication and authorization mechanisms such as OAuth or JWT tokens.&lt;/p&gt;

&lt;p&gt;When implementing strict access control, it is important to keep in mind the principle of least privilege. This means that users should only be granted the minimum amount of access necessary to perform their job functions.&lt;/p&gt;

&lt;p&gt;In order to effectively implement access control, the API should have a clear understanding of the different types of users and the actions they should be able to perform. This information can then be used to create roles with specific permissions that can be assigned to users.&lt;/p&gt;

&lt;p&gt;For example, an administrator may have full access to all resources while a regular user may only be able to access certain parts of the API. In this way, access control helps to ensure that the API remains secure and that sensitive data is only accessible by those who are authorized to access it.&lt;/p&gt;




&lt;p&gt;It is also important to regularly monitor and audit access to the API in order to detect any unauthorized access or attempts to exploit vulnerabilities. &lt;br&gt;
This can be done through the use of logs, which can be used to track user activity and detect any suspicious behavior.&lt;/p&gt;

&lt;p&gt;And that's it ! See U next level Doobs !&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>Testing the Waters: A Comedic Take on TDD with React Testing Library</title>
      <dc:creator>rardooba</dc:creator>
      <pubDate>Mon, 20 Mar 2023 07:30:00 +0000</pubDate>
      <link>https://dev.to/rardooba/testing-the-waters-a-comedic-take-on-tdd-with-react-testing-library-116g</link>
      <guid>https://dev.to/rardooba/testing-the-waters-a-comedic-take-on-tdd-with-react-testing-library-116g</guid>
      <description>&lt;p&gt;Test-Driven Development (TDD) is a software development process that emphasizes writing tests before writing the actual code. This process helps developers to build high-quality, well-designed software that is easy to maintain and less prone to bugs. In this article, we will cover the process of setting up TDD with Jest on a modal component.&lt;/p&gt;

&lt;p&gt;Jest is a popular JavaScript testing library that makes it easy to write and run tests. It is well-suited for TDD and provides a wide range of features for testing React components, including snapshot testing and mocking.&lt;/p&gt;

&lt;p&gt;Here are the steps to set up TDD with Jest on a modal component:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Install React &amp;amp; Testing library&lt;/strong&gt; : Projects created with &lt;code&gt;Create React App&lt;/code&gt; have out of the box support for React Testing Library.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a simple &lt;strong&gt;modal component&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Modal&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="nx"&gt;isOpen&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;onClose&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;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;div&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;isOpen&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&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;p&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;This&lt;/span&gt; &lt;span class="nx"&gt;is&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="nx"&gt;modal&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/p&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;onClick&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;onClose&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Close&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;/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="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="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;Modal&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Create a test file&lt;/strong&gt;: Create a new file in the same directory as your modal component and call it &lt;code&gt;Modal.test.js&lt;/code&gt;. This is where you will write your tests.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Write your first test&lt;/strong&gt;: To write your first test, you will need to import the modal component and Jest's render method. The render method will allow you to render the component in a testing environment and interact with it.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&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="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;render&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;@testing-library/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;Modal&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;./Modal&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Modal&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="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;it&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;renders the modal when it is open&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="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;getByText&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&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;Modal&lt;/span&gt; &lt;span class="nx"&gt;isOpen&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;getByText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;This is a modal&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;toBeInTheDocument&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Run the test&lt;/strong&gt;: To run the test, you can use the following command in your terminal:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run &lt;span class="nb"&gt;test&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Write additional tests&lt;/strong&gt;: Now that you have a basic test in place, you can write additional tests to cover all the functionality of your modal component. For example, you can write a test to ensure that the modal is not rendered when it is not open, or that the close button works as expected.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Implement the modal component&lt;/strong&gt;: With your tests in place, you can now implement the modal component with confidence. As you write the code, you can run the tests to ensure that everything works as expected.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;By following these steps, you will have set up TDD with Jest on your modal component. This process will help you to write better, more maintainable code and reduce the risk of bugs. Additionally, as your component evolves, you can continue to write tests to ensure that it continues to work as expected.&lt;/p&gt;

&lt;p&gt;And that's it ! See U next level Doobs !&lt;/p&gt;

</description>
      <category>gratitude</category>
    </item>
    <item>
      <title>The Junior Developer's Dilemma: To AI or Not to AI ?</title>
      <dc:creator>rardooba</dc:creator>
      <pubDate>Fri, 17 Mar 2023 07:30:00 +0000</pubDate>
      <link>https://dev.to/rardooba/the-junior-developers-dilemma-to-ai-or-not-to-ai--38e6</link>
      <guid>https://dev.to/rardooba/the-junior-developers-dilemma-to-ai-or-not-to-ai--38e6</guid>
      <description>&lt;p&gt;As a front-end developer, I am often faced with the question of whether AI is beneficial for junior developers. After much reflection, I am convinced that AI can be a valuable aid for junior developers, but it must be used with caution.&lt;/p&gt;

&lt;p&gt;It is true that AI can make finding solutions quicker and easier. However, it can also prevent the learning through trial and error and difficulty that is essential for junior developers. When a junior simply copies code without understanding its meaning, they miss the essence of learning. It is therefore important that juniors do not rely solely on AI to complete their training.&lt;/p&gt;

&lt;p&gt;It is also important to note that AI lacks semantic thinking, which means it may not always understand the nuances and complex contexts of a project. This can result in errors that will not be immediately identified by juniors.&lt;/p&gt;

&lt;p&gt;I think it's important that juniors view AI as an assistant rather than a replacement. AI can help them find solutions quickly, but it cannot replace a mentor who will impart experience and knowledge tailored to each situation.&lt;/p&gt;

&lt;p&gt;Ultimately, I believe AI can be useful for junior developers, but it must be used with caution and in combination with a rigorous learning process. Juniors should not see AI as an easy solution for their projects, but rather as a tool that they can use in extreme cases of blockage. AI is a powerful tool, but it is entirely dependent on its user. Juniors must therefore be aware of its limitations and use AI responsibly in order to make the most of it.&lt;/p&gt;

&lt;p&gt;And that's it ! See U next level Nomad !&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>philosophy</category>
    </item>
    <item>
      <title>Hidden Screen Geniuses: The IT Artists aka Front-End, Back-End, and Full-Stack Developers</title>
      <dc:creator>rardooba</dc:creator>
      <pubDate>Wed, 15 Mar 2023 07:30:00 +0000</pubDate>
      <link>https://dev.to/rardooba/hidden-screen-geniuses-the-it-artists-aka-front-end-back-end-and-full-stack-developers-27ci</link>
      <guid>https://dev.to/rardooba/hidden-screen-geniuses-the-it-artists-aka-front-end-back-end-and-full-stack-developers-27ci</guid>
      <description>&lt;p&gt;In the world of software development, different types of developers play a crucial role in creating software and websites. Understanding the type of developer you need for your project depends on your needs in terms of functionality and performance. In this article, we'll provide an overview of the roles and responsibilities of each type of developer, including front-end, back-end, and full-stack developers.&lt;/p&gt;

&lt;p&gt;Front-end Developer: Front-end developers are responsible for designing and creating the user interface (UI) for applications and websites. They use programming languages such as HTML, CSS, and JavaScript to develop interactive and responsive designs that provide a smooth user experience. For example, a front-end developer could work for an e-commerce company to develop a user-friendly interface for customers, using HTML, CSS, and JavaScript to create an attractive and easy-to-use presentation.&lt;/p&gt;

&lt;p&gt;Back-end Developer: Back-end developers are responsible for designing and building the invisible part of an application, such as data management and algorithms. They use programming languages such as NodeJs, PHP, Ruby on Rails, Python, and Java to develop functional and secure applications. For example, a back-end developer could work for a wealth management company to design a secure database management system, using a programming language such as NodeJs or Python to ensure data security and reliability.&lt;/p&gt;

&lt;p&gt;Full-stack Developer: Full-stack developers are developers who have skills in both front-end and back-end development. They are responsible for the design, construction, and complete implementation of an application. For example, a full-stack developer could work for a financial services company to develop a personal finance management application, using HTML, CSS, JavaScript, and a server-side programming language such as NodeJs to design a functional and user-friendly application.&lt;/p&gt;

&lt;p&gt;That's it ! See U next level Doobs !&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>devjournal</category>
    </item>
    <item>
      <title>The Importance of Clean Code in JavaScript/TypeScript</title>
      <dc:creator>rardooba</dc:creator>
      <pubDate>Mon, 13 Mar 2023 07:30:00 +0000</pubDate>
      <link>https://dev.to/rardooba/the-importance-of-clean-code-in-javascripttypescript-4367</link>
      <guid>https://dev.to/rardooba/the-importance-of-clean-code-in-javascripttypescript-4367</guid>
      <description>&lt;p&gt;Writing clean code is an important aspect of software development, as it makes the code more maintainable, readable, and scalable. However, it is not uncommon to see code written in a way that does not follow the best practices of clean coding.&lt;/p&gt;

&lt;p&gt;Here is an example of a code in JavaScript/TypeScript that contains &lt;strong&gt;10&lt;/strong&gt; common mistakes that violate clean code principles:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;x&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
    &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;c&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;c&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;y&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;z&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;x&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;z&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
    &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;x&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;y&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;p&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same code, rewritten with clean code principles in mind, would look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;addNumbers&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="kr"&gt;number&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;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;multiplyNumbers&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="kr"&gt;number&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;x&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;processNumbers&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;processFunction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;num&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="kr"&gt;number&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;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;processFunction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&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;result&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here are the benefits of using clean code principles in the rewritten code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Improved readability&lt;/strong&gt;: The code is much easier to read, understand, and follow.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Increased maintainability&lt;/strong&gt;: The code is more maintainable, as it is less prone to bugs and easier to update.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Better organization&lt;/strong&gt;: The code is organized in a logical way, making it easier to navigate and maintain.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Enhanced scalability&lt;/strong&gt;: The code is scalable, as it can easily be extended and integrated with other parts of the application.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Better code reusability&lt;/strong&gt;: The code is reusable, as it can be used in other parts of the application without modification.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Enhanced debugging&lt;/strong&gt;: The code is easier to debug, as errors and bugs can be easily traced and fixed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Improved performance&lt;/strong&gt;: The code is more performant, as it is optimized for efficiency.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Better collaboration&lt;/strong&gt;: The code is easier to collaborate on, as multiple developers can understand and work with it more easily.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Improved documentation&lt;/strong&gt;: The code is easier to document, as it is clear and self-explanatory.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Better overall quality&lt;/strong&gt;: The code is of higher quality, as it adheres to best practices and standards.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;And that's it ! See U next level Doobs !&lt;/p&gt;

</description>
      <category>gratitude</category>
    </item>
    <item>
      <title>Design Thinking: A User-Centered Problem-Solving Method with a Hilarious Twist</title>
      <dc:creator>rardooba</dc:creator>
      <pubDate>Wed, 08 Mar 2023 09:30:00 +0000</pubDate>
      <link>https://dev.to/rardooba/design-thinking-a-user-centered-problem-solving-method-with-a-hilarious-twist-378</link>
      <guid>https://dev.to/rardooba/design-thinking-a-user-centered-problem-solving-method-with-a-hilarious-twist-378</guid>
      <description>&lt;p&gt;Design thinking is a problem-solving method that puts the user at the center of all decisions. It involves a deep understanding of the needs, motivations, and behaviors of the people for whom the product or solution is designed. This approach promotes interdisciplinary collaboration and a user-experience-focused culture of innovation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Advantages of Design Thinking
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Deep User Understanding&lt;/strong&gt;: Design thinking involves actively listening to users to understand their real needs, leading to the development of products and solutions that truly meet their expectations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;User-Experience-Focused Innovation&lt;/strong&gt;: The focus on user experience encourages teams to explore new ideas and adopt a creative approach to problem-solving, resulting in innovative and differentiated solutions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Interdisciplinary Collaboration&lt;/strong&gt;: Design thinking involves close collaboration between different teams and disciplines, leading to a deeper understanding of the issues and better problem-solving.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Quick Idea Evaluation&lt;/strong&gt;: The design thinking method also includes the creation of prototypes and user testing, allowing for quick evaluation of ideas and adaptation accordingly.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Disadvantages of Design Thinking
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Time and Cost&lt;/strong&gt;: The design thinking method can be longer and more expensive than traditional problem-solving approaches.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Deep Understanding Needed&lt;/strong&gt;: Design thinking requires a deep understanding of principles and tools to be effectively used, making team training necessary.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Collaboration Required&lt;/strong&gt;: Design thinking involves close collaboration between different teams and disciplines, which can be difficult to establish in some organizations.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;Design thinking is a powerful approach to problem-solving by putting the user at the center of all decisions. However, it's important to understand the potential advantages and disadvantages before deciding to adopt it in an organization. By using this method strategically and consciously, companies can take advantage of its benefits while minimizing its drawbacks.&lt;/p&gt;

&lt;p&gt;And that's it ! See U next level Doobs !&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>design</category>
      <category>startup</category>
      <category>todayilearned</category>
    </item>
    <item>
      <title>When React Met Next.js: A Love Story for the Ages ️</title>
      <dc:creator>rardooba</dc:creator>
      <pubDate>Wed, 08 Mar 2023 07:30:00 +0000</pubDate>
      <link>https://dev.to/rardooba/when-react-met-nextjs-a-love-story-for-the-ages-1093</link>
      <guid>https://dev.to/rardooba/when-react-met-nextjs-a-love-story-for-the-ages-1093</guid>
      <description>&lt;p&gt;As a front-end developer, you're always on the lookout for the perfect combination of libraries and frameworks that will help you build fast, scalable, and maintainable web applications. And when it comes to building high-performance &lt;a href="https://fr.reactjs.org/" rel="noopener noreferrer"&gt;React&lt;/a&gt; apps, &lt;a href="https://nextjs.org/" rel="noopener noreferrer"&gt;Next.js&lt;/a&gt; is the ultimate sidekick.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;So what exactly is Next.js, and why should you be using it with React?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Next.js is a React-based framework that provides a simple and elegant solution for server-side rendering (SSR). In other words, it takes care of rendering your React components on the server, which not only makes your website faster and more reliable, but also helps you improve your SEO and accessibility.&lt;/p&gt;

&lt;p&gt;Here are just a few of the many benefits of using &lt;strong&gt;&lt;u&gt;React&lt;/u&gt;&lt;/strong&gt; with &lt;strong&gt;&lt;u&gt;Next.js&lt;/u&gt;&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Speed&lt;/strong&gt;: With Next.js, your pages load quickly, even on slow internet connections. The framework pre-renders your pages on the server and sends them to the client, so that the user can start interacting with your website almost immediately.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SEO&lt;/strong&gt;: Next.js is SEO-friendly, which means that search engines can easily crawl and index your pages. This is particularly important if you're building a content-rich website that needs to be discovered by users.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code Splitting&lt;/strong&gt;: Next.js automatically splits your code into smaller chunks, so that the browser only loads what's needed for the current page. This helps to reduce the size of your JavaScript files and improve the overall performance of your website.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Accessibility&lt;/strong&gt;: Next.js makes it easy to build accessible websites, which means that your website will be usable by users with disabilities. The framework provides built-in accessibility features, such as semantic HTML and ARIA support.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Easy to Set Up&lt;/strong&gt;: Next.js is incredibly easy to set up and get started with. All you need to do is create a new project, install the Next.js dependencies, and start building your pages.&lt;/p&gt;

&lt;p&gt;So if you're looking to build fast, scalable, and accessible React apps, look no further than Next.js. With its powerful features and ease of use, it's the perfect complement to your React skillset. So why not give it a try and see for yourself? The front-end skies are the limit!&lt;/p&gt;

&lt;p&gt;That's it ! See U next level Doobs !&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>Why should you use Typescript in React App ?</title>
      <dc:creator>rardooba</dc:creator>
      <pubDate>Mon, 06 Mar 2023 07:30:00 +0000</pubDate>
      <link>https://dev.to/rardooba/why-should-you-use-typescript-in-react-app--mm7</link>
      <guid>https://dev.to/rardooba/why-should-you-use-typescript-in-react-app--mm7</guid>
      <description>&lt;p&gt;TypeScript is a popular superset of JavaScript that adds optional static typing to the language. When building a React application, using TypeScript can bring a number of benefits, making development process more robust and efficient.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;
&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&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="kr"&gt;string&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;getUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;John Doe&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;35&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;johndoe@example.com&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;returnedUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;getUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;returnedUser&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One of the main benefits of using TypeScript in a React application is improved code quality. The static typing in TypeScript allows developers to catch errors early on, while they're still working on the code. For example, if a developer accidentally assigns the wrong data type to a variable, TypeScript will catch that error and alert the developer right away. This can save a lot of time and effort in the long run, as it reduces the number of bugs that will need to be fixed later on.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&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;FC&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="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;Props&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&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;ExampleComponent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;FC&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Props&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&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;message&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;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;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;Bonjour&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="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;p&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;message&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;/p&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="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;ExampleComponent&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Another benefit of TypeScript is improved developer productivity. TypeScript's type checking and IntelliSense features provide a better development experience, as it makes it easier for developers to understand the codebase and navigate through it. It also provides support for things like code refactoring, which can save a lot of time during development.&lt;/p&gt;

&lt;p&gt;TypeScript also brings better scalability to your application. With the help of TypeScript, the codebase will be more maintainable and less prone to errors, as it makes it much easier to identify and fix bugs. It also makes it easier for new developers to understand the codebase and get up to speed with the project.&lt;/p&gt;

&lt;p&gt;TypeScript also allows you to use the latest JavaScript features such as ES6/ES7/ES8/ES9/ES10 with its support to JS version. It also allows you to use JSX syntax in your codebase. This means that you can take advantage of the latest language features, without having to wait for them to be fully supported by all browsers.&lt;/p&gt;

&lt;p&gt;Additionally, TypeScript is widely adopted and supported by various javascript libraries and frameworks such as React, Angular, NestJS, etc. This means that you'll have access to a wide range of third-party libraries and resources, making it easier to work with those libraries, and leverage existing community knowledge.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&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="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;NextPage&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;next&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kr"&gt;enum&lt;/span&gt; &lt;span class="nx"&gt;Status&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;PENDING&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;PENDING&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;SUCCESS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;SUCCESS&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;ERROR&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ERROR&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;Props&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Status&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&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;StatusComponent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NextPage&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Props&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;status&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;message&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;let&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;switch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="nx"&gt;Status&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;PENDING&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="nx"&gt;className&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;pending&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nx"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Loading...&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="nx"&gt;Status&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;SUCCESS&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="nx"&gt;className&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;success&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nx"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="nx"&gt;Status&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;ERROR&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="nx"&gt;className&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;error&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nx"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;default&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="nx"&gt;className&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nx"&gt;text&lt;/span&gt; &lt;span class="o"&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="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;div&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;`status &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;text&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;/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="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;StatusComponent&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In conclusion, TypeScript is a powerful tool that can bring a number of benefits to a React application. It improves code quality, developer productivity, scalability, and allows you to take advantage of the latest JavaScript features. It is also widely adopted and supported by various libraries and frameworks. If you want to create a more robust and maintainable React application, consider using TypeScript.&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
    </item>
    <item>
      <title>Atomic Design: The 5 Secrets to Taming UI Chaos in React</title>
      <dc:creator>rardooba</dc:creator>
      <pubDate>Fri, 03 Mar 2023 07:30:00 +0000</pubDate>
      <link>https://dev.to/rardooba/atomic-design-the-5-secrets-to-taming-ui-chaos-in-react-ddj</link>
      <guid>https://dev.to/rardooba/atomic-design-the-5-secrets-to-taming-ui-chaos-in-react-ddj</guid>
      <description>&lt;p&gt;&lt;strong&gt;Atomic design&lt;/strong&gt; is a methodology for designing user interfaces that has been gaining popularity among developers in recent years. It allows developers to break down complex UI elements into smaller, reusable components, making the development process more efficient and manageable. This article will cover the 5 fundamentals of atomic design that are essential for implementing the methodology in a React application.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Atoms&lt;/strong&gt;: The Building Blocks of UI
Atoms are the smallest and most basic building blocks of a user interface. Examples of atoms include buttons, form inputs, and text. Atoms are used to create the foundation for the UI and can be combined to form more complex components.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;//Example of a button atom component in React&lt;/span&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="s2"&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;ButtonAtom&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&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;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;button&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;className&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;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;children&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;/button&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;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;ButtonAtom&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Molecules&lt;/strong&gt;: A Combination of Atoms
Molecules are slightly more complex than atoms and are composed of multiple atoms. For example, a form that contains several form inputs would be considered a molecule. By combining atoms to form molecules, developers can create more complex UI elements without having to start from scratch.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;//Example of a form molecule component in React&lt;/span&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="s2"&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;ButtonAtom&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./ButtonAtom&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;InputAtom&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./InputAtom&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;FormMolecule&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&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;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;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;className&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;InputAtom&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;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;Username&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;InputAtom&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;password&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;Password&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;ButtonAtom&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;/ButtonAtom&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;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;FormMolecule&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;//Example file structure &lt;span class="k"&gt;for &lt;/span&gt;an atomic design
src/
|- components/
|  |- atoms/
|  |  |- ButtonAtom.js
|  |  |- InputAtom.js
|  |- molecules/
|  |  |- FormMolecule.js
|  |- organisms/
|  |- templates/
|  |- pages/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Organisms&lt;/strong&gt;: The Foundation of Layout
Organisms are the foundation of the layout and organization of the user interface. They are made up of multiple molecules and are responsible for defining the layout and placement of UI elements on a page. For example, a header that contains a logo, a navigation menu, and a search bar would be considered an organism.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;//Example of a header organism component in React&lt;/span&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="s2"&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;LogoMolecule&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./LogoMolecule&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;NavigationMolecule&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./NavigationMolecule&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;SearchMolecule&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./SearchMolecule&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;HeaderOrganism&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&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;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;header&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;className&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;LogoMolecule&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;NavigationMolecule&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;SearchMolecule&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="sr"&gt;/header&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;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;HeaderOrganism&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Templates&lt;/strong&gt; are used to define the structure of a page and are made up of multiple organisms. They provide a blueprint for the layout of a page, and ensure that all pages in the application have a consistent structure. For example, a template could define the position of the header, footer, and main content area, allowing developers to focus on filling in the content for each page, rather than worrying about the layout.
&lt;/li&gt;
&lt;/ol&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;Header&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;./Header&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;Footer&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;./Footer&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;Layout&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&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;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;div&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;layout&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;Header&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;main&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;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;children&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;/main&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;Footer&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="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="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;Layout&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, the Layout component acts as the wrapper for the template, and the Header and Footer components define the structure of the header and footer respectively. The props.children component allows developers to define the main content area of the page within the Layout component. To use the template, developers can wrap the content for each page in the Layout component, like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="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;Layout&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;./Layout&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;About&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="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;Layout&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;About&lt;/span&gt; &lt;span class="nx"&gt;Us&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;p&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Lorem&lt;/span&gt; &lt;span class="nx"&gt;ipsum&lt;/span&gt; &lt;span class="nx"&gt;dolor&lt;/span&gt; &lt;span class="nx"&gt;sit&lt;/span&gt; &lt;span class="nx"&gt;amet&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;/p&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;/Layout&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;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;About&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By using templates in this way, developers can create pages that have a consistent structure, while also allowing for flexibility and customization of the main content area for each page.&lt;/p&gt;

&lt;p&gt;That's it ! See U next level Doobs !&lt;/p&gt;

&lt;p&gt;If you want to learn more about &lt;strong&gt;Atomic Design&lt;/strong&gt; ? Go &lt;a href="https://atomicdesign.bradfrost.com/table-of-contents/"&gt;here&lt;/a&gt; Doobs !&lt;/p&gt;

</description>
      <category>react</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>atomicdesign</category>
    </item>
  </channel>
</rss>
