<?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: Vivian Gichure</title>
    <description>The latest articles on DEV Community by Vivian Gichure (@vivgichure).</description>
    <link>https://dev.to/vivgichure</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%2F3305387%2Fc7b2053b-a4f0-4f14-9d86-2aa4ce11abfb.png</url>
      <title>DEV Community: Vivian Gichure</title>
      <link>https://dev.to/vivgichure</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vivgichure"/>
    <language>en</language>
    <item>
      <title>Why I Chose Next.js for My Web App</title>
      <dc:creator>Vivian Gichure</dc:creator>
      <pubDate>Wed, 23 Jul 2025 09:22:57 +0000</pubDate>
      <link>https://dev.to/vivgichure/why-i-chose-nextjs-for-my-web-app-435d</link>
      <guid>https://dev.to/vivgichure/why-i-chose-nextjs-for-my-web-app-435d</guid>
      <description>&lt;p&gt;Hey everyone! Today I want to quickly talk about Next.js, the framework I used to build my recent web project — and why it’s awesome!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;💡 So, What is Next.js?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Next.js is a React framework that makes building web apps faster and easier. It comes with built-in features like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✨ File-based routing (you don’t need to manually configure routes)&lt;/li&gt;
&lt;li&gt;⚡ Server-side rendering (SSR) for better SEO and performance&lt;/li&gt;
&lt;li&gt;📦 API routes — yes, you can build a backend too!&lt;/li&gt;
&lt;li&gt;🔥 Turbopack (their new bundler) — super fast during development&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;🔧 Why I Used It&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I used it for my cat adoption app because it helped me:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create clean, organized pages quickly&lt;/li&gt;
&lt;li&gt;Load data from my JSON server easily&lt;/li&gt;
&lt;li&gt;Optimize for SEO — which is great if it ever goes live!&lt;/li&gt;
&lt;li&gt;And, it just works really well with React&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;🚀 Final Thoughts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you already know React and want to take your projects to the next level, try Next.js. You’ll build faster, smarter, and cleaner apps.&lt;/p&gt;

&lt;p&gt;Thanks for tuning in! Let me know if you want a tutorial on setting up Next.js or using API routes.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>react</category>
    </item>
    <item>
      <title>🧠Mastering the DOM: A Beginner’s Guide to Dynamic Web Pages</title>
      <dc:creator>Vivian Gichure</dc:creator>
      <pubDate>Sun, 29 Jun 2025 13:07:39 +0000</pubDate>
      <link>https://dev.to/vivgichure/mastering-the-dom-a-beginners-guide-to-dynamic-web-pages-59fh</link>
      <guid>https://dev.to/vivgichure/mastering-the-dom-a-beginners-guide-to-dynamic-web-pages-59fh</guid>
      <description>&lt;p&gt;When you load a webpage, what you see — buttons, images, forms — is only the surface. Behind it all is a powerful interface that lets JavaScript interact with HTML. That interface is called the DOM(Document Object Model).&lt;/p&gt;

&lt;p&gt;Whether you're creating a simple image gallery or a full-blown web app, understanding the DOM is the key to making your pages dynamic, interactive, and alive.&lt;/p&gt;

&lt;p&gt;In this post, I’ll break down what the DOM is, why it’s important, and how you can manipulate it using JavaScript — with beginner-friendly examples.&lt;/p&gt;

&lt;h2&gt;
  
  
  🌳What Is the DOM?
&lt;/h2&gt;

&lt;p&gt;The DOM is a tree-like structure that represents your webpage’s HTML in memory. When your browser loads a page, it reads the HTML and builds this DOM tree.&lt;/p&gt;

&lt;p&gt;Each HTML element like(&lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;,&lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;,&lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt;,etc.)becomes a node in this tree. JavaScript can then access and manipulate those nodes.&lt;/p&gt;

&lt;p&gt;Here’s a simple HTML snippet:&lt;/p&gt;

&lt;p&gt;HTML&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;h1&amp;gt;Hello, World!&amp;lt;/h1&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;This becomes a structure like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Document
 └── html
     └── body
         └── h1
             └── "Hello, World!"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The beauty of the DOM is that you can change or add to this structure in real-time using JavaScript.&lt;/p&gt;

&lt;h2&gt;
  
  
  🎯 Why Learn DOM Manipulation?
&lt;/h2&gt;

&lt;p&gt;Learning how to work with the DOM allows you to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Make your websites interactive&lt;/li&gt;
&lt;li&gt;Update content without refreshing the page&lt;/li&gt;
&lt;li&gt;Handle user input in real-time&lt;/li&gt;
&lt;li&gt;Create, modify, or remove HTML elements dynamically&lt;/li&gt;
&lt;li&gt;Build more powerful frontend apps using frameworks (React, 
Vue, etc.)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🧰 Accessing Elements in the DOM
&lt;/h2&gt;

&lt;p&gt;To change anything in the DOM, we need to select it using JavaScript.&lt;br&gt;
javascript&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Select by ID
const title = document.getElementById("main-title");

// Select using CSS selector
const button = document.querySelector(".my-button");

// Select all matching elements
const items = document.querySelectorAll(".list-item");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once selected, we can manipulate them:&lt;br&gt;
javascript&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;title.textContent = "New Title";
button.style.color = "blue";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  ✍️ Changing Content Dynamically
&lt;/h2&gt;

&lt;p&gt;Let’s say your HTML has this:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;p id="status"&amp;gt;Loading...&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Using JavaScript, we can change that text:&lt;/p&gt;

&lt;p&gt;javascript&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const status = document.getElementById("status");
status.textContent = "Loaded!";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No reload. Just pure DOM magic.&lt;/p&gt;

&lt;h2&gt;
  
  
  📦 Creating and Appending Elements
&lt;/h2&gt;

&lt;p&gt;Let’s say you want to add items to a list:&lt;/p&gt;

&lt;p&gt;javascript&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const ul = document.querySelector("ul");
const li = document.createElement("li");
li.textContent = "New Task";
ul.appendChild(li);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates a new &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; element and adds it to the end of your &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt; list.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧲 Handling Events
&lt;/h2&gt;

&lt;p&gt;DOM + Events = interactivity. For example:&lt;br&gt;
html&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;button id="clickMe"&amp;gt;Click me!&amp;lt;/button&amp;gt;
&amp;lt;p id="output"&amp;gt;&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;javascript&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const btn = document.getElementById("clickMe");
const output = document.getElementById("output");

btn.addEventListener("click", () =&amp;gt; {
  output.textContent = "You clicked the button!";
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This makes the page react to a user action — something every modern site needs.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧪 Bonus: Toggle Visibility
&lt;/h2&gt;

&lt;p&gt;Here’s how to show or hide content on click:&lt;/p&gt;

&lt;p&gt;html&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;p id="text"&amp;gt;Toggle me!&amp;lt;/p&amp;gt;
&amp;lt;button id="toggleBtn"&amp;gt;Hide/Show&amp;lt;/button&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;javascript&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const text = document.getElementById("text");
const toggleBtn = document.getElementById("toggleBtn");

toggleBtn.addEventListener("click", () =&amp;gt; {
  text.style.display = text.style.display === "none" ? "block" : "none";
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🔨 Practice Challenge: Build a Mini To-Do App
&lt;/h2&gt;

&lt;p&gt;Here’s a great way to test your skills:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create an input and a button&lt;/li&gt;
&lt;li&gt;When the button is clicked, add the input value to a list&lt;/li&gt;
&lt;li&gt;Allow users to click on items to mark them as done&lt;/li&gt;
&lt;li&gt;You’ll use createElement, appendChild, addEventListener, and more — all DOM essentials.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  ✅ Final Thoughts
&lt;/h2&gt;

&lt;p&gt;The DOM is the bridge between your JavaScript and HTML. It’s how you take a static page and breathe life into it — adding interactivity, personality, and responsiveness.&lt;/p&gt;

&lt;p&gt;Learning DOM manipulation is a critical foundation for any web developer. Whether you're going into vanilla JavaScript or moving into frameworks like React, Vue, or Angular, this knowledge will stay with you.&lt;/p&gt;

&lt;p&gt;Keep experimenting. Break things. Build fun projects.&lt;/p&gt;

&lt;p&gt;Because that’s how great developers are made.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>html</category>
      <category>frontend</category>
    </item>
  </channel>
</rss>
