<?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: Wunmi</title>
    <description>The latest articles on DEV Community by Wunmi (@wunmi).</description>
    <link>https://dev.to/wunmi</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%2F1464938%2F00c69f66-767f-48a8-b8f7-005293684c0f.jpg</url>
      <title>DEV Community: Wunmi</title>
      <link>https://dev.to/wunmi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wunmi"/>
    <language>en</language>
    <item>
      <title>My Frontend Developer Journey x HNG</title>
      <dc:creator>Wunmi</dc:creator>
      <pubDate>Wed, 29 Jan 2025 21:33:51 +0000</pubDate>
      <link>https://dev.to/wunmi/my-frontend-developer-journey-x-hng-3po5</link>
      <guid>https://dev.to/wunmi/my-frontend-developer-journey-x-hng-3po5</guid>
      <description>&lt;p&gt;As a UI/UX designer, I have always been fascinated by the synergy between design and functionality. Creating visually appealing interfaces is fulfilling, but I have increasingly felt the need to bridge the gap between design and implementation. This desire has driven me to start learning front-end development, and while I have made progress, I am eager to deepen my skills and become more proficient.&lt;/p&gt;

&lt;p&gt;My motivation for transitioning requires me to build front-end development skills and this stems from a strong desire to have a more holistic impact on the products I work on.  I see myself evolving into a design engineer and a Creative Web Developer, someone who seamlessly blends user-centered design with the technical expertise required to build dynamic, high-performing web applications, and insanely creatively built websites. In today’s tech industry, the ability to both design and develop is increasingly valuable, and I believe this skill set will enable me to contribute more meaningfully to projects. The demand for skilled front-end developers is constantly growing.  Many companies, when looking to build modern and interactive web experiences, often choose to hire specialized developers. For example, for projects requiring dynamic and responsive user interfaces, businesses might choose to hire React.js developers (&lt;a href="https://hng.tech/hire/reactjs-developers" rel="noopener noreferrer"&gt;https://hng.tech/hire/reactjs-developers&lt;/a&gt;).  This allows them to leverage the component-based architecture and rich ecosystem of React.  Similarly, when the focus is on server-side rendering and performance, companies might look to hire Next.js developers (&lt;a href="https://hng.tech/hire/nextjs-developers" rel="noopener noreferrer"&gt;https://hng.tech/hire/nextjs-developers&lt;/a&gt;) to build optimized and scalable web applications.&lt;/p&gt;

&lt;p&gt;The HNG program, with its intensive, hands-on approach, is the perfect environment for me to advance my learning. Its emphasis on real-world projects, mentorship, and collaboration will provide the structure and support I need to refine my front-end skills. I’m especially excited about learning and connecting with other developers as exposure to different perspectives will challenge and enhance my problem-solving abilities.&lt;/p&gt;

&lt;p&gt;My goals for this internship are clear. I want to strengthen my skills in core front-end technologies JavaScript, ReactJS and NextJS. Beyond technical expertise, I aim to develop a strong understanding of performance optimization, accessibility, and cross-browser compatibility, ensuring that the applications I build are not just visually appealing but also functional and inclusive.&lt;/p&gt;

&lt;p&gt;To achieve these goals, I plan to fully immerse myself in the HNG program by actively participating in learning sessions, completing assignments diligently, and seeking feedback from mentors and peers. I recognize that continuous learning is key in this field, so I will also dedicate time to exploring new technologies and best practices outside the program. I’m eager to contribute to open-source projects and build a portfolio of real-world applications that demonstrate my growing expertise. With dedication, hard work, and the support of the HNG team, I am confident that I can successfully hit my career goals.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Simple way to build a Counter Functionality with ReactJS</title>
      <dc:creator>Wunmi</dc:creator>
      <pubDate>Sun, 12 Jan 2025 20:17:59 +0000</pubDate>
      <link>https://dev.to/wunmi/simple-way-to-build-a-counter-functionality-with-reactjs-lo8</link>
      <guid>https://dev.to/wunmi/simple-way-to-build-a-counter-functionality-with-reactjs-lo8</guid>
      <description>&lt;p&gt;Having counter buttons is very common in web apps like ecommerce app, etc. This functionality helps users to be able to increase or decrease a number of items. In this article, I will be sharing a very simple way to build this, using a product page as a use case. Of course, this knowledge can be helpful in some other projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Steps
&lt;/h2&gt;

&lt;p&gt;Install your react and tailwind CSS. I used ReactJS and Tailwind CSS in building this. To install,&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a folder on your desktop or anywhere in your PC&lt;/li&gt;
&lt;li&gt;Open that same folder in Visual Studio Code, then open your Terminal with shortcut CTRL + J. In your terminal, type in&lt;/li&gt;
&lt;li&gt;npm create vite@latest&lt;/li&gt;
&lt;li&gt;Put a dot . for project name so it creates automatically&lt;/li&gt;
&lt;li&gt;Select react (for select framework)&lt;/li&gt;
&lt;li&gt;Select JavaScript (for select variant)&lt;/li&gt;
&lt;li&gt;Then, type in npm install, and then npm run dev afterwards&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of these steps can be found in the react documentation. For tailwind CSS installation you can follow the process here.&lt;/p&gt;

&lt;p&gt;So, let’s get started with the build. &lt;/p&gt;

&lt;p&gt;After building the structure of your app and styling, how do we make it work?&lt;/p&gt;

&lt;p&gt;See below a snippet of mine&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F700u3gl2mkr56aol0zaq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F700u3gl2mkr56aol0zaq.png" alt="Image description" width="800" height="269"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F37bmx2zt3fgdp2ufr2lq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F37bmx2zt3fgdp2ufr2lq.png" alt="Image description" width="800" height="385"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To make the increase and decrease button functional, create a counter function using useState . The useState hook allows us to manage state within our component. In this case, we'll use it to track the current count value. We will initialize the state to 1, which represents the minimum quantity. You can adjust this value as needed e.g. set it to 0 for a minimum quantity of zero.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const [counter, setCounter] = useState(1);

    const increment = () =&amp;gt; {
      setCounter(counter + 1);
    };

    const decrement = () =&amp;gt; {
      if (counter &amp;gt; 0) { 
        setCounter(counter - 1); 
      }
    };
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With our variable name being counter and setCounter. Our useState has an initial value of 1&lt;/p&gt;

&lt;p&gt;The incremental and decremental function is set to +1 and -1. You can always change this to be +2, +3, etc. depending on the increase and decrease progression you want on every click.&lt;/p&gt;

&lt;p&gt;After this, you go to where the count value is, in this case, our p tag and include {counter} to  display the count value automatically.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div className='py-2 px-4 rounded-lg bg-[#eeeeee] border-[#dddddd] min-w-fit' onClick={decrement}&amp;gt;
        &amp;lt;FontAwesomeIcon icon={faMinus} /&amp;gt;
        &amp;lt;/div&amp;gt;

        &amp;lt;p className='font-semibold text-xl'&amp;gt; {counter} &amp;lt;/p&amp;gt;

        &amp;lt;div className='py-2 px-4 rounded-lg bg-[#eeeeee] border-[#dddddd] min-w-fit' onClick={increment}&amp;gt;
        &amp;lt;FontAwesomeIcon icon={faPlus} /&amp;gt;
        &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Testing our app&lt;/p&gt;

&lt;p&gt;Ensure your changes is being saved. Go to your live server and test. You should see the Counter App rendered on the screen with an initial count and the two buttons to increase and decrease the count.&lt;/p&gt;

&lt;p&gt;Clicking the Increase button or icon will increase the count, and clicking the Decrease will decrease it. The updated count value will be displayed on the screen.&lt;/p&gt;

&lt;p&gt;Congratulations! You have successfully built a simple counter app using ReactJS. &lt;/p&gt;

&lt;p&gt;You can view my live build here  &lt;a href="https://ecommerce-counter-orpin.vercel.app/" rel="noopener noreferrer"&gt;https://ecommerce-counter-orpin.vercel.app/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>counterapp</category>
      <category>counterfunctionality</category>
      <category>ecommerceapp</category>
      <category>productpage</category>
    </item>
    <item>
      <title>An article on CSS cascade, selector and specificity</title>
      <dc:creator>Wunmi</dc:creator>
      <pubDate>Thu, 02 May 2024 20:43:15 +0000</pubDate>
      <link>https://dev.to/wunmi/an-article-on-css-cascade-selector-and-specificity-4f90</link>
      <guid>https://dev.to/wunmi/an-article-on-css-cascade-selector-and-specificity-4f90</guid>
      <description>&lt;p&gt;CSS is what gives web pages their style and layout, making them look visually appealing and easy to navigate. But behind the scenes, there’s a system at work that determines how styles are applied, known as the cascade, selectors, and specificity.&lt;/p&gt;

&lt;p&gt;Imagine CSS rules as a set of instructions telling your browser how to display elements on a web page. But what happens when multiple rules clash, or when styles seem to conflict? That’s where the cascade comes in.&lt;/p&gt;

&lt;p&gt;The &lt;u&gt;cascade&lt;/u&gt; is like a set of rules that determines which styles take precedence. It follows a hierarchy, where styles from different sources are applied in a specific order. These sources include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;User Agent Stylesheets: Every browser comes with its default styles, known as user agent stylesheets. These serve as the foundation for how elements are displayed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Author Stylesheets: These are the styles you, as a web developer, apply directly to your HTML document using &lt;code&gt;&amp;lt;style&amp;gt;&lt;/code&gt; tags or by linking an external CSS file.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;User Stylesheets: Some users might have their own custom stylesheets, perhaps to override certain design choices or accommodate accessibility needs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Inline Styles: These are styles applied directly to individual HTML elements using the &lt;code&gt;style&lt;/code&gt; attribute. They have the highest specificity and will override any other styles.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When conflicting styles arise, the cascade decides which one prevails based on a set of rules. Generally, styles with higher specificity, importance, or order take precedence.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Selectors&lt;/u&gt; are the heart of CSS. They're the patterns you use to target specific HTML elements and apply styles to them. Selectors come in various forms, each with its own specificity:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Element Selectors: These target HTML elements directly. For example, &lt;code&gt;p&lt;/code&gt; targets all &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; paragraphs on the page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Class Selectors: Classes are reusable identifiers that can be applied to multiple elements. They're denoted by a dot (&lt;code&gt;.&lt;/code&gt;) followed by the class name (e.g., &lt;code&gt;.btn&lt;/code&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ID Selectors: IDs are unique identifiers assigned to a single element. They're denoted by a hash (&lt;code&gt;#&lt;/code&gt;) followed by the ID name (e.g., &lt;code&gt;#header&lt;/code&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Attribute Selectors: These target elements based on their attributes. For example, &lt;code&gt;[type="text"]&lt;/code&gt; targets all elements with the attribute &lt;code&gt;type="text"&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pseudo-classes and Pseudo-elements: These target elements based on their state or position in the document. For example, &lt;code&gt;:hover&lt;/code&gt; targets elements when they're being hovered over by the mouse.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;u&gt;Specificity&lt;/u&gt; is what determines which CSS rule takes precedence when multiple rules target the same element. It's like a points system, where each selector carries a certain weight:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Inline Style*: 1000 points&lt;/li&gt;
&lt;li&gt;ID Selectors: 100 points&lt;/li&gt;
&lt;li&gt;Class Selectors, Attribute Selectors, and Pseudo-classes: 10 points&lt;/li&gt;
&lt;li&gt;Element Selectors and Pseudo-elements: 1 point&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When comparing two conflicting rules, the one with the higher specificity wins, regardless of the order in which they appear. If two rules have the same specificity, the one that appears last in the stylesheet takes precedence—a concept known as the "last rule wins" principle.&lt;/p&gt;

&lt;p&gt;Understanding the cascade, selectors, and specificity is crucial for mastering CSS and creating well-organized, maintainable stylesheets. By grasping these concepts, you'll have better control over how your web pages look and behave, ensuring a smoother and more consistent user experience.&lt;/p&gt;

</description>
      <category>webdev</category>
    </item>
  </channel>
</rss>
