<?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: Jessica Cecilia Budianto</title>
    <description>The latest articles on DEV Community by Jessica Cecilia Budianto (@jessicacb12).</description>
    <link>https://dev.to/jessicacb12</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%2F1174291%2Ffb85b2d5-39f6-4576-8155-da74214eaef9.jpeg</url>
      <title>DEV Community: Jessica Cecilia Budianto</title>
      <link>https://dev.to/jessicacb12</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jessicacb12"/>
    <language>en</language>
    <item>
      <title>Ran out of idea for AI product, so I talked to Gemini</title>
      <dc:creator>Jessica Cecilia Budianto</dc:creator>
      <pubDate>Sun, 29 Jun 2025 07:35:57 +0000</pubDate>
      <link>https://dev.to/jessicacb12/ran-out-of-idea-for-ai-product-so-i-talked-to-gemini-hgl</link>
      <guid>https://dev.to/jessicacb12/ran-out-of-idea-for-ai-product-so-i-talked-to-gemini-hgl</guid>
      <description>&lt;p&gt;As the title suggests, this is a story of how talking to an AI helped me come up with a unique product idea &lt;em&gt;with&lt;/em&gt; AI — one that might be different from what people usually create. What you’ll get here is my insight on AI integration into websites that actually can be developed into real tech products. I have 2 versions of websites that I’ll show here: one that’s code is open to the public and one that I might plan to develop further. So pardon if I don’t share the code for the latter 😆&lt;/p&gt;

&lt;p&gt;Warning: since this is a story, expect this article to be &lt;em&gt;long&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;During preparation for BWAI I was confused on what kind of material I wanted to present. I wanted to do something different, as I didn’t want to talk about something like how to integrate Gemini into your web. I wanted to talk about use cases instead, but couldn’t come up with an idea. Then I discussed with Gemini what I should talk about, and Gemini advised me to use AI to improve user experience.&lt;/p&gt;

&lt;p&gt;Then it struck me that generally when people incorporate AI into their code (disclaimer: not everyone’s like this. But even back then when I was asked to create something with AI, I did this too) there can be a tendency to make it too… grandish.&lt;/p&gt;

&lt;p&gt;Often, projects are built around showcasing AI itself — instead of using AI to solve a real, everyday problem. Think of license plate recognition or live sign language translators. Impressive? Definitely.&lt;/p&gt;

&lt;p&gt;But let’s think of it as if we try to make it as a real business, where what matters the most is sustainability. The budget and the infrastructure can be very challenging. And in the society that is still trying to get used to adopting technology into their daily life, they can be skeptical even more to invest heavily.&lt;/p&gt;

&lt;p&gt;Disclaimer: I don’t want to demotivate people to freely explore what they can do with AI. But I’m also aware that some people or communities, they inadvertently “set the bar” that &lt;em&gt;tech products with AI should be cool and look futuristic&lt;/em&gt;. And I’m afraid that this is what &lt;em&gt;actually&lt;/em&gt; demotivates people to explore AI for a product that’s simpler but actually closer to what the market actually needs.&lt;/p&gt;

&lt;p&gt;But anyway, back with my convo with Gemini again. So this was what crossed my mind: what if we try to combine AI with form, like a form assistant? And now maybe some of you wonder: why form?&lt;/p&gt;

&lt;p&gt;As a web developer, I realized form is one of the most common kinds of UI that tends to have UX issues. Let’s be honest — filling out forms is boring. Especially when they’re long, unclear, or asking for too much. At some point, we might even blanking out and autopilot filling it. AI these days will definitely beat us in filling these forms if they have our knowledge 😂.&lt;/p&gt;

&lt;p&gt;Then I brainstormed with my friend about what kind of form that might require an assistant to fill it. What crossed my mind at first was the tax reporting form, but my friend pointed out that this wasn’t very relatable for students if I wanted to present this in a university. Then we came up with a CV consultant web idea.&lt;/p&gt;

&lt;p&gt;I created my very first CV in a career class, preparing to apply for an internship. Since we have never written a CV before, we were shown an example of how a CV looks like. Does this experience sound familiar? When we don’t know what to write on your CV or we don’t consider ourselves good with words, we resort to imitating the stereotype of a &lt;em&gt;successful&lt;/em&gt; person's CV. Or now there are lots of CV creator websites which can help us with this.&lt;/p&gt;

&lt;p&gt;People think that this is just the issue of fresh graduates, but even now my CV summary still sounds... dry. The reason? It’s not that I don’t know who I am — I just don’t know how to &lt;em&gt;say it right&lt;/em&gt;. And I don’t want it to sound sugarcoated too — think this is obvious by how I write this article. So I play it safe even though my description sounds really dry.&lt;/p&gt;

&lt;p&gt;But let’s think about it from a hiring perspective. If we want to hire someone for a particular position and there are lots of applicants, we can’t hire everyone right? As someone who will work with this new person, we prefer someone who isn’t just capable in doing their job but also is &lt;em&gt;nice&lt;/em&gt; to collaborate with. And from the whole company perspective, we want this new person to bring value to the business. And this can be difficult right if everyone’s CV sounds the same?&lt;/p&gt;

&lt;p&gt;So it’s expected for HR to look for &lt;em&gt;the one&lt;/em&gt; (people can complain that the one that is chosen not because they’re capable but because they have a connection inside the company but since this is not always the case and a completely different matter, let’s rule this out first). So much like dating huh? And just like in dating — it’s difficult.&lt;/p&gt;

&lt;p&gt;There’s an influencer’s tweet that I found even mentioning about a lot of rubbish-like CVs submitted into a company and how difficult it is to find &lt;em&gt;the one&lt;/em&gt;. His words can be triggering but I think there’s a silver lining in it.&lt;/p&gt;

&lt;p&gt;So, my idea is to create a CV creator website, with a ‘consultant’ inside it that’s powered by Gemini. Hopefully, this ‘consultant’ can help users make their CV more personalized. Because rather than just beautify the content of the CV that the user gives, users can actually consult on how to deliver their message through their CV. The complete open source repo can be found in &lt;a href="https://gitlab.com/jessicacecil12/cv-consultant" rel="noopener noreferrer"&gt;this repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Very first thing I did, I integrated Gemini in my code. I generated the key in &lt;a href="https://console.cloud.google.com/apis/credentials" rel="noopener noreferrer"&gt;Google Cloud API Credentials&lt;/a&gt;. I rarely generate key in Google Cloud, and when I did this I had to admit Google is really practical in generating API keys that can easily be used for any API; doesn’t have to be specific only for Gemini use. &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%2Fd4qf8unha7if8ymobltj.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%2Fd4qf8unha7if8ymobltj.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here I didn’t just train Gemini to be a CV consultant, but also to return the answer in HTML format so that I can display it nicely later.&lt;/p&gt;

&lt;p&gt;Next I developed the chat. I have never developed a chat product before, so I just developed this based on my interpretation of what's needed in a chat. These are the 3 parts that I initially developed for my chat.&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%2Fbc3vkgt7mosvayw8q0zo.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%2Fbc3vkgt7mosvayw8q0zo.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Explanations:&lt;br&gt;
The onSend was initially just a console log. I completed this later in the development&lt;br&gt;
Since the chat with AI is normally just a 1o1 question - answer, I used this format in as a structure for chatHistory&lt;br&gt;
Typically typedQuestion isn’t necessarily to be stored as a state right? When I trigger the onSend, I can just get the value of the target event. But I stored it as a state because I planned to do some magic 🔮&lt;/p&gt;

&lt;p&gt;Next on I developed the CV creator part. I keep it super simple with only a single card form component that’s used to fill the Summary of the CV, as this is the one that I will simulate later. There are 2 parts of this component.&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%2Fz7iokmuahqr2cat9daud.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%2Fz7iokmuahqr2cat9daud.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Explanations:&lt;br&gt;
Clicking on the inner part is of course to fill in the summary of the CV. Need to be careful not to click the outer part.&lt;br&gt;
The outer part? Let me show it. Let’s say after I write something in the inner part, I click the outer part&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%2Fb9ll9i8fhyoycm7xzwmz.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%2Fb9ll9i8fhyoycm7xzwmz.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Pretty cool right? 😆Fellow coders may say that this is not rocket science. Doesn’t matter, I loved building it. But this is the reason why I stored the typedQuestion as a state.&lt;/p&gt;

&lt;p&gt;Finally I added the processing in the onSend. You can check it on the code later. Here is the full flow of the open sourced website. Or you can check it on your own &lt;a href="https://cv-consultant.netlify.app/" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/7b5BTBSkGSs"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;During the development, I realized there is a lot of potential for this website. For example the stored chat history can be exposed to the HR, though for the implementation I know there can be a privacy T&amp;amp;C or something that the users need to agree with. My idea is that maybe by exposing the chat, the HR can get more insights from the candidate aside from their CV.&lt;/p&gt;

&lt;p&gt;To end my story, let me show you a &lt;em&gt;slightly&lt;/em&gt; more polished version I’ve built. Hope you got some ideas (or at least a smile) from reading this. My approach isn’t the way — just a way. And maybe it’ll spark ✨ something better in you.. &lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/C-ur_5wTjVw"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ai</category>
      <category>gemini</category>
      <category>react</category>
    </item>
    <item>
      <title>React: should state live in parents?</title>
      <dc:creator>Jessica Cecilia Budianto</dc:creator>
      <pubDate>Tue, 21 Nov 2023 18:07:37 +0000</pubDate>
      <link>https://dev.to/jessicacb12/react-should-state-live-in-parents-75p</link>
      <guid>https://dev.to/jessicacb12/react-should-state-live-in-parents-75p</guid>
      <description>&lt;p&gt;(With that cliche sound of N*tfl*x series opening) &lt;em&gt;Previously in my writing...&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Yea yea&lt;/em&gt; I wrote about Virtual DOM, but that's not what I meant. What I will write today is related with what I wrote in Component Scoping in my previous article. If you haven't read it or in case you forgot already, you can check it here (&lt;em&gt;and boost my views too&lt;/em&gt; 😌).&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag__link"&gt;
  &lt;a href="/jessicacb12" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YDSXhLG2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/practicaldev/image/fetch/s--WHeOIA3m--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://dev-to-uploads.s3.amazonaws.com/uploads/user/profile_image/1174291/fb85b2d5-39f6-4576-8155-da74214eaef9.jpeg" alt="jessicacb12"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/jessicacb12/react-how-i-understand-virtual-dom-through-usestate-3f73" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;React: how I understand Virtual DOM through useState&lt;/h2&gt;
      &lt;h3&gt;Jessica Cecilia Budianto ・ Oct 11&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#beginners&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#react&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#javascript&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#webdev&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Initial experiment: compare the state change in parent and child&lt;/li&gt;
&lt;li&gt;Second experiment: profile the re-render&lt;/li&gt;
&lt;li&gt;So, what's the verdict and what's next?&lt;/li&gt;
&lt;li&gt;Further Readings&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Initial experiment: compare the state change in parent and child
&lt;/h2&gt;

&lt;p&gt;So actually, I have been playing around with &lt;code&gt;useState&lt;/code&gt;, doing some tiny experiments. My previous article was actually one of the insights I got from these experiments, and I decided to correlate it with my understanding about Virtual DOM. So now you know that I didn't just understand Virtual DOM last month ✌️&lt;/p&gt;

&lt;p&gt;Last time, I placed the state in the &lt;code&gt;Child&lt;/code&gt; component. This time, I tried to centralize all states in parent instead. To give you the big picture , here is how the &lt;code&gt;App&lt;/code&gt; looks like.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { useState } from 'react';
import Child from './Child';
import Title from './Title';
import Button from './Button';

export default function App() {
  const [shown, setShown] = useState(false);
  const [shown2, setShown2] = useState(false);

  return (
    &amp;lt;div&amp;gt;
        &amp;lt;Title/&amp;gt;
        &amp;lt;Child order={1} shown={shown} /&amp;gt;
        &amp;lt;Child order={2} shown={shown2} /&amp;gt;
        &amp;lt;Button order={1} onClick={() =&amp;gt; setShown(prev =&amp;gt; !prev)}/&amp;gt;
        &amp;lt;Button order={2} onClick={() =&amp;gt; setShown2(prev =&amp;gt; !prev)}/&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Now let's start to visit the components one by one.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export default function Title() {
    console.log('Rendering title');
    return &amp;lt;h1&amp;gt;TITLE HERE&amp;lt;/h1&amp;gt;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;em&gt;Yea&lt;/em&gt; very simple right for &lt;code&gt;Title&lt;/code&gt;? Just a mere heading and a &lt;code&gt;console.log&lt;/code&gt; to inform when this component is rendered.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { useState } from "react";

export default function Child ({ order, shown }) {
    const [count, setCount] = useState(0);

    console.log('Render child', order)

    return (
        &amp;lt;div onClick={() =&amp;gt; setCount(prev =&amp;gt; prev + 1)}&amp;gt;
            CHILD {order} {String(shown)} count {count}
        &amp;lt;/div&amp;gt;
    )
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The &lt;code&gt;Child&lt;/code&gt; component receives 2 props:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;order&lt;/code&gt; as the identifier of the component&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;shown&lt;/code&gt; as the state that will be changed from its parent&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Aside from the passed props, I also add a local state &lt;code&gt;count&lt;/code&gt; for comparison later.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export default function Button ({ order, onClick }) {
    console.log('Render button', order)
    return &amp;lt;button onClick={onClick}&amp;gt;BUTTON {order}&amp;lt;/button&amp;gt;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Lastly there's also this &lt;code&gt;Button&lt;/code&gt; component with passed &lt;code&gt;onClick&lt;/code&gt; which will trigger the change in &lt;code&gt;Child&lt;/code&gt;, another &lt;code&gt;order&lt;/code&gt; as identifier, and &lt;code&gt;console.log&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Now let's see the result here.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cojUSBiD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yglpecdp1jdsgqu78b58.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cojUSBiD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yglpecdp1jdsgqu78b58.gif" alt="Aside from value change in Child 1, clicking the Button 1 triggers console log for Title, Child 1, Child 2, Button 1, and Button 2. Similar things happened when clicking Button 2." width="600" height="719"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's expected right that &lt;code&gt;Child 1&lt;/code&gt; is re-rendered? Since it accepts props from its parent and the value changes, of course the component will be re-rendered&lt;/p&gt;

&lt;p&gt;What about &lt;code&gt;Button 1&lt;/code&gt;? Sure it's clicked to trigger change in &lt;code&gt;Child 1&lt;/code&gt; and it accepts props too. But the value doesn't change right, so is it expected?&lt;/p&gt;

&lt;p&gt;What about &lt;code&gt;Child 2&lt;/code&gt; and &lt;code&gt;Button 2&lt;/code&gt; also accept props but the value don't even change. Are they expected to get re-rendered too?&lt;/p&gt;

&lt;p&gt;And the weirdest one is for &lt;code&gt;Title&lt;/code&gt; which doesn't accept any props from its parent, yet it still gets re-rendered.&lt;/p&gt;

&lt;p&gt;Now what about the state that only exists in &lt;code&gt;Child&lt;/code&gt; component? Since its parent doesn't aware of their existence, the parent should not get re-rendered right?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FAvcCj4U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1u8ct5i8b2weh3gr5lxu.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FAvcCj4U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1u8ct5i8b2weh3gr5lxu.gif" alt="Aside from value change in Child 1, clicking Child 1 only triggers console for Child 1. Similar thing happened when clicking Child 2" width="600" height="719"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And yep only the &lt;code&gt;Child&lt;/code&gt; itself that is re-rendered. In fact this is already spoiled in my previous article 😂 or to quote it again:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;By separating &lt;code&gt;Child&lt;/code&gt; component from &lt;code&gt;App&lt;/code&gt;, it is only normal if the state change in &lt;code&gt;Child&lt;/code&gt; will only re-render &lt;code&gt;Child&lt;/code&gt; right? After all only &lt;code&gt;Child&lt;/code&gt; knows the existence of &lt;code&gt;count&lt;/code&gt; state. And yes it is.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I have heard a saying that &lt;strong&gt;props/state change is the one that causes re-render&lt;/strong&gt;. Not wrong, of course, but there seems to be a caveat.&lt;/p&gt;

&lt;p&gt;Sure, props/state change triggers re-render, but it seems not to be the only reason. In fact, &lt;strong&gt;the parent component re-render will also re-render its children&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;I know some of you will be like:&lt;br&gt;
🗣️ &lt;em&gt;That's why you should pay attention to the documentation&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;And does it exist in React documentation? Yes, it does. I don't know if you guys can find the more specific statement about this somewhere in the docs, but here is the one I found in &lt;code&gt;useState&lt;/code&gt; caveats&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://react.dev/reference/react/useState#setstate-caveats" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--IySh9hOP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://react.dev/images/og-reference.png" height="420" class="m-0" width="800"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://react.dev/reference/react/useState#setstate-caveats" rel="noopener noreferrer" class="c-link"&gt;
          useState – React
        &lt;/a&gt;
      &lt;/h2&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
        react.dev
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;I know that there are a lot of optimization done by React like memoization, but it seems that re-rendering its children after props / state change is remain the component &lt;strong&gt;default behavior&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;And this actually leads us to one of the most famous performance-related questions:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Is re-render a bad thing?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Second experiment: profile the re-render
&lt;/h2&gt;

&lt;p&gt;In general, labeling something as 'good' or 'bad' is subjective, right? Something that's considered 'good' can be considered 'bad' instead by others, depends on circumstances and preferences. Just like instant noodle that's not healthy, but healthier for your budget 🍜&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Goodness how random I am&lt;/em&gt; 🤣 but what I'm saying is, we can't judge anything without 'proof'. Only after we prove it, we can take decision whether to improve it or let it slide for higher priorities.&lt;/p&gt;

&lt;p&gt;So let's start by separating the code in &lt;code&gt;App&lt;/code&gt; into component called &lt;code&gt;Parent&lt;/code&gt; as shown below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { useState } from 'react';
import Child from './Child';
import Title from './Title';
import Button from './Button';

export default function Parent() {
  const [shown, setShown] = useState(false);
  const [shown2, setShown2] = useState(false);
  const [count, setCount] = useState(0);

  return (
    &amp;lt;div&amp;gt;
        &amp;lt;Title/&amp;gt;
        &amp;lt;Child
            order={1}
            shown={shown}
            count={count}
            setCount={setCount}
        /&amp;gt;
        &amp;lt;Child order={2} shown={shown2} /&amp;gt;
        &amp;lt;Button order={1} onClick={() =&amp;gt; setShown(prev =&amp;gt; !prev)}/&amp;gt;
        &amp;lt;Button order={2} onClick={() =&amp;gt; setShown2(prev =&amp;gt; !prev)}/&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Doesn't look exactly the same like before right? I deliberately put out the &lt;code&gt;count&lt;/code&gt; state into &lt;code&gt;Parent&lt;/code&gt; and pass them to &lt;code&gt;Child 1&lt;/code&gt;. I also adjusted the &lt;code&gt;Child&lt;/code&gt; component as shown below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export default function Child ({
    order,
    shown,
    count = 0,
    setCount = () =&amp;gt; {}
}) {
    console.log('Render child', order)

    return (
        &amp;lt;div onClick={() =&amp;gt; setCount(prev =&amp;gt; prev + 1)}&amp;gt;
            CHILD {order} {String(shown)} count {count}
        &amp;lt;/div&amp;gt;
    )
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now for the &lt;code&gt;App&lt;/code&gt;, aside from importing the &lt;code&gt;Parent&lt;/code&gt; I wrap it with &lt;code&gt;Profiler&lt;/code&gt; component which is used to measure the rendering performance. Don't worry if you have never heard of this, you can check the documentation later attached at the end of this article. You'll see how this works after this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { Profiler } from "react";
import Parent from "./Parent";

export default function App() {
  const handleRender = (
    _id,
    phase,
    actualDuration,
    baseDuration
  ) =&amp;gt; {
    console.log(
      'RERENDERING',
      phase,
      'ACTUAL',
      actualDuration,
      'BASE',
      baseDuration
    );
  }

  return (
    &amp;lt;Profiler id="Parent" onRender={handleRender}&amp;gt;
      &amp;lt;Parent/&amp;gt;
    &amp;lt;/Profiler&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To give you a brief explanation of parameters in &lt;code&gt;onRender&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;phase&lt;/code&gt; indicates whether the component is just mounted or there has been state change &lt;strong&gt;either&lt;/strong&gt; in the component or its children&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;actualDuration&lt;/code&gt; is, to make it short, how long the whole wrapped component is rendered.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;baseDuration&lt;/code&gt; is the one that I bet all of you gets confused with &lt;code&gt;actualDuration&lt;/code&gt; 😂 same guys same. Now this one is the &lt;strong&gt;estimation&lt;/strong&gt; how long the component will get rendered.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Oh and also, please ignore the &lt;code&gt;console.log&lt;/code&gt; that is printed twice per component re-render. The component is still only gets rendered once per re-render. This is how it looks like.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uL17ria_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dn6rkbbetzippdxts7he.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uL17ria_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dn6rkbbetzippdxts7he.gif" alt="State in parent performance" width="600" height="581"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Either clicking on &lt;code&gt;Child 1&lt;/code&gt; or &lt;code&gt;Button 1&lt;/code&gt; trigger the re-render for the whole components. On mounted it already takes 8ms, longer than estimated 5.5ms to render the whole components. The re-render takes shorter time (1 - 3ms) than the initial render as mentioned in React &lt;code&gt;Profiler&lt;/code&gt; documentation.&lt;/p&gt;

&lt;p&gt;Now let's put back the &lt;code&gt;count&lt;/code&gt; state into the &lt;code&gt;Child&lt;/code&gt; again. To avoid confusion, here is how &lt;code&gt;Parent&lt;/code&gt; component become.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { useState } from 'react';
import Child from './Child';
import Title from './Title';
import Button from './Button';

export default function Parent() {
  const [shown, setShown] = useState(false);
  const [shown2, setShown2] = useState(false);

  return (
    &amp;lt;div&amp;gt;
        &amp;lt;Title/&amp;gt;
        &amp;lt;Child order={1} shown={shown} /&amp;gt;
        &amp;lt;Child order={2} shown={shown2} /&amp;gt;
        &amp;lt;Button order={1} onClick={() =&amp;gt; setShown(prev =&amp;gt; !prev)}/&amp;gt;
        &amp;lt;Button order={2} onClick={() =&amp;gt; setShown2(prev =&amp;gt; !prev)}/&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the &lt;code&gt;Child&lt;/code&gt; component looks like this again.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { useState } from "react";

export default function Child ({ order, shown }) {
    const [count, setCount] = useState(0);

    console.log('Render child', order)

    return (
        &amp;lt;div onClick={() =&amp;gt; setCount(prev =&amp;gt; prev + 1)}&amp;gt;
            CHILD {order} {String(shown)} count {count}
        &amp;lt;/div&amp;gt;
    )
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And here is the result.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MfqfW3lC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5nsruuruvg2s031a14kz.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MfqfW3lC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5nsruuruvg2s031a14kz.gif" alt="State in child performance" width="600" height="581"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It takes 7.3ms to perform the initial render for the whole components, but I don't think we can consider the 0.7ms difference is the improvement effect since it's still a small difference. This can be biased by the cache and stuffs anyway.&lt;/p&gt;

&lt;p&gt;But what's &lt;em&gt;actually&lt;/em&gt; significant is it only takes 0.8ms to render the change on clicking &lt;code&gt;Child&lt;/code&gt; component. While it still takes the usual 1 - 3ms to render the change on clicking &lt;code&gt;Button&lt;/code&gt; component.&lt;/p&gt;

&lt;h2&gt;
  
  
  So, what's the verdict and what's next?
&lt;/h2&gt;

&lt;p&gt;Now we know that it definitely takes shorter time to re-render only the child than the whole component, which, is of course a good thing.&lt;/p&gt;

&lt;p&gt;Aside from performance, there's actually no use right to put &lt;code&gt;count&lt;/code&gt; state in &lt;code&gt;Parent&lt;/code&gt; component? If only &lt;code&gt;Child&lt;/code&gt; component is the one that needs it, why putting it in its parent? There is no need for its parent component to know the existence of this state unless they also consume it. So in a way, this also encourages us to maintain better architecture right?&lt;/p&gt;

&lt;p&gt;But come to think of performance again, 3ms to 0.8ms is not that &lt;em&gt;huge&lt;/em&gt; difference right? They are still in millisecond anyway, so small that user won't directly feel the difference. But what about for a page with more complex component structures and more complex data? Would that still be the same?&lt;/p&gt;

&lt;p&gt;Lots of more questions right instead of answer? 😂 I didn't plan to give you the exact answer when writing this. But hopefully I manage to intrigue your curiosity to learn deeper, as I plan to research more about re-render in my next writings.&lt;/p&gt;

&lt;p&gt;Until then, see ya! 👋&lt;/p&gt;

&lt;h2&gt;
  
  
  Further Readings
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://react.dev/reference/react/useState"&gt;React useState&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://react.dev/reference/react/Profiler"&gt;React Profiler&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>React: how I understand Virtual DOM through useState</title>
      <dc:creator>Jessica Cecilia Budianto</dc:creator>
      <pubDate>Wed, 11 Oct 2023 06:54:29 +0000</pubDate>
      <link>https://dev.to/jessicacb12/react-how-i-understand-virtual-dom-through-usestate-3f73</link>
      <guid>https://dev.to/jessicacb12/react-how-i-understand-virtual-dom-through-usestate-3f73</guid>
      <description>&lt;p&gt;Honestly. Due to the pressure of ✨ getting things done ✨ while working on my class project using React, all I knew about state in React is simply as a tool in managing data at a component level. And I used to be that &lt;em&gt;using framework due to rising popularity&lt;/em&gt; kind of programmer.&lt;/p&gt;

&lt;p&gt;But come on, don't lie. Sometimes some of you are still like this right?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1ya9oanj1ep8hxeacv9c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1ya9oanj1ep8hxeacv9c.png" alt="Hehehe"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But of course, I'm not (or should I say, &lt;em&gt;trying not to be&lt;/em&gt;) like that anymore which is why I'm writing this hahaha. Ok enough with the intermezzo. Let's get into this, shall we?&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Component Scoping&lt;/li&gt;
&lt;li&gt;Virtual DOM&lt;/li&gt;
&lt;li&gt;Further Readings&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Component Scoping
&lt;/h2&gt;

&lt;p&gt;The thing about React is that it incorporates the 'scoping' mindset using component so well. So well that I forgot that &lt;strong&gt;React is still built on top of our sweet old HTML + JavaScript with DOM&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Since I have learned about OOP (Object Oriented Programming) first before React, I see component as a resemblance of object encapsulation where changes will only affect particular component.&lt;/p&gt;

&lt;p&gt;Perhaps if you're not familiar with OOP or you didn't get my point, let me give the analogy. Your house consists of several rooms right? There's bedroom, kitchen, etc. If you want &lt;u&gt;only&lt;/u&gt; your bedroom to be painted blue, it should be possible right? Not necessarily the whole house has to be painted blue unless you just want to raise a feud.&lt;/p&gt;

&lt;p&gt;Below is the example of that in React.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { useState } from "react";

const Child = () =&amp;gt; {
    const [count, setCount] = useState(0);

    return &amp;lt;div onClick={() =&amp;gt; setCount(prev =&amp;gt; prev + 1)}&amp;gt;COUNT {count}&amp;lt;/div&amp;gt;
}
export default Child;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Child component is then imported into App below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import Child from './Child';
import Title from './Title';

const App = () =&amp;gt; {
  return (
    &amp;lt;div&amp;gt;
        &amp;lt;Title/&amp;gt;
        &amp;lt;Child /&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}

export default App;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By separating Child component from App, it is only normal if the state change in Child will only re-render Child right? After all only Child knows the existence of &lt;code&gt;count&lt;/code&gt; state. And yes it is.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fms1bcm6f2pbkuvrqsfla.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fms1bcm6f2pbkuvrqsfla.gif" alt="Component Change in Elements Tab in DevTools. Only the count component that 'blinks' before changing"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Or if we try to &lt;code&gt;console.log&lt;/code&gt; in Child component,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { useState } from "react";

const Child = () =&amp;gt; {
    const [count, setCount] = useState(0);
    console.log('Rendering child')
    return &amp;lt;div onClick={() =&amp;gt; setCount(prev =&amp;gt; prev + 1)}&amp;gt;COUNT {count}&amp;lt;/div&amp;gt;
}
export default Child;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;it will look like this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx58glrs5z2vdj2bhhrp7.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx58glrs5z2vdj2bhhrp7.gif" alt="How the components are rendered. Console log will only be called per clicking 'count'"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Virtual DOM
&lt;/h2&gt;

&lt;p&gt;Then that silly late realization came to me: &lt;em&gt;Wait. React is still JavaScript after all right? Then it means there's actually a DOM manipulation for every props / state change right?&lt;/em&gt; Or in my understanding, these are the logics to do it in DOM manipulation:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Our algorithm has to &lt;strong&gt;specifically know which&lt;/strong&gt; component that need to be changed. And to solve the &lt;em&gt;which&lt;/em&gt;, usually we have to rely on selectors like ID, classname, etc.&lt;/li&gt;
&lt;li&gt;After knowing the &lt;em&gt;which&lt;/em&gt; part, We have to query the specific component earlier. If such query is not possible (e.g: no selector is available), we might need replace the entire page with the new version, which will &lt;strong&gt;re-render the whole body&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Theoritically in programming, query is expensive. And I haven't even mentioned that this DOM change is performed by &lt;em&gt;listening&lt;/em&gt; to the variable used as the props / state, perhaps using bind or listener (I haven't researched deeper for this one though). So, always having to listen to changes, find the specific attribute, querying and altering the DOM per change... That's expensive.&lt;/p&gt;

&lt;p&gt;But after all framework is meant to improve performance right? And &lt;em&gt;virtual DOM&lt;/em&gt; is what React came up with.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Virtual&lt;/em&gt;... Sounds so futuristic right? Lol.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5ejonue1ila0m47wvpob.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5ejonue1ila0m47wvpob.png" alt="Like Sword Art Online floating castle"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can read more about this virtual DOM in the article I attached below, but just to summarize: it's a mechanism in which React will only re-render (or performing something similar to that crazy expensive computation earlier) after comparing the snapshots of the current and previous situation. Only after &lt;strong&gt;there's actually a change&lt;/strong&gt;, the re-render happens.&lt;/p&gt;

&lt;p&gt;Which also means, React won't re-render the component if the state is not changed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { useState } from "react";

const Child = () =&amp;gt; {
    const [count, setCount] = useState(0);

    console.log('Render child')

    return &amp;lt;div onClick={() =&amp;gt; setCount(0)}&amp;gt;Count {count}&amp;lt;/div&amp;gt;
}
export default Child;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvr3oig1lu0dxhw01j5tk.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvr3oig1lu0dxhw01j5tk.gif" alt="Re-render doesn't happen anymore to Child component even after clicking 'count'"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Really cool huh?&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.giphy.com%2Fmedia%2FzIwIWQx12YNEI%2Fgiphy.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.giphy.com%2Fmedia%2FzIwIWQx12YNEI%2Fgiphy.webp" alt="Like witchcraft lol 🔮"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Okay this is the end of my writing today. Gotta save for the next article anyway right? 😌 Think I'll still write about &lt;code&gt;useState&lt;/code&gt; again for the next few articles, perhaps something related about the state change between Component and its Child earlier? 👀 Stay tune!&lt;/p&gt;

&lt;h2&gt;
  
  
  Further Readings
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://blog.logrocket.com/virtual-dom-react/" rel="noopener noreferrer"&gt;What is the virtual DOM in React?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

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