<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Lutfi Maulana on Medium]]></title>
        <description><![CDATA[Stories by Lutfi Maulana on Medium]]></description>
        <link>https://medium.com/@lutfimaulana.fi?source=rss-5af674349536------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*sx4AJYMIda7TCb5co5D8QQ.jpeg</url>
            <title>Stories by Lutfi Maulana on Medium</title>
            <link>https://medium.com/@lutfimaulana.fi?source=rss-5af674349536------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 07:28:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@lutfimaulana.fi/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Hidden Cost of Reflow & Repaint]]></title>
            <link>https://medium.com/@lutfimaulana.fi/the-hidden-cost-of-reflow-repaint-ac4f1f14bbb2?source=rss-5af674349536------2</link>
            <guid isPermaLink="false">https://medium.com/p/ac4f1f14bbb2</guid>
            <dc:creator><![CDATA[Lutfi Maulana]]></dc:creator>
            <pubDate>Thu, 08 Jan 2026 00:12:31 GMT</pubDate>
            <atom:updated>2026-01-08T00:12:31.221Z</atom:updated>
            <content:encoded><![CDATA[<h3>Why Changing Position Can Be More Expensive Than You Think</h3><p>As frontend engineers, we move elements <strong>all the time</strong>:</p><ul><li>dropdowns</li><li>modals</li><li>tooltips</li><li>animations</li><li>sticky headers</li></ul><p>But here’s the uncomfortable truth:</p><blockquote><strong><em>Not all “position changes” are equal.</em></strong><em><br> Some are cheap.<br> Some silently destroy performance.</em></blockquote><p>Let’s talk about <strong>reflow</strong>, <strong>repaint</strong>, and why <em>how</em> you move elements matters more than <em>that</em> you move them.</p><h3>How Browsers Actually Draw Your Page</h3><p>Before touching performance, we need to understand <strong>what the browser does</strong>.</p><p>When the browser renders your page, it follows this pipeline:</p><p>JavaScript -&gt; Style Calculation -&gt; Layout (Reflow) -&gt; Paint (Repaint) -&gt; Composite</p><p>The most expensive step here is Layout (Reflow).</p><h3>What Is Reflow (and Why It’s Expensive)?</h3><p><strong>Reflow</strong> happens when the browser needs to recalculate:</p><ul><li>element size</li><li>position</li><li>layout relationships with other elements</li></ul><h3>Reflow is expensive because:</h3><ul><li>One change can affect <strong>many elements</strong></li><li>It blocks the <strong>main thread</strong></li><li>It can trigger <strong>cascading layout recalculations</strong></li></ul><h3>Example: A “simple” position change</h3><pre>element.style.left = &quot;100px&quot;;</pre><p>This looks harmless, but the browser must now:</p><ol><li>Recalculate this element’s layout</li><li>Recalculate nearby elements</li><li>Possibly recalculate parent containers</li></ol><p><strong>One change, many calculations.</strong></p><h3>What Is Repaint (and Why It’s Cheaper)?</h3><p><strong>Repaint</strong> happens when only <strong>visual appearance</strong> changes:</p><ul><li>color</li><li>background</li><li>shadow</li><li>border</li></ul><p>Example:</p><pre>element.style.backgroundColor = &quot;red&quot;;</pre><p>Layout stays the same.<br> The browser only redraws pixels.</p><p>✅ Repaint is cheaper<br> ❌ Still not free</p><h3>The Real Problem: Changing Position the Wrong Way</h3><p>Most performance problems come from <strong>moving elements incorrectly</strong>.</p><h3>Layout-triggering position changes</h3><pre>element.style.top = &quot;50px&quot;;<br>element.style.left = &quot;100px&quot;;</pre><p>This causes:</p><ul><li>Reflow</li><li>Repaint</li></ul><p>Every time it runs.</p><p>Now imagine this inside:</p><ul><li>scroll event</li><li>mousemove</li><li>animation loop</li></ul><p><strong>UI jank incoming.</strong></p><h3>The Golden Rule: Avoid Layout Changes in Motion</h3><p>If an element <strong>moves frequently</strong>, it should <strong>not affect layout</strong>.</p><h3>The correct way: transform</h3><pre>element.style.transform = &quot;translate(100px, 50px)&quot;;</pre><p>Why this is better:</p><ul><li>No reflow</li><li>No repaint</li><li>GPU-accelerated</li><li>Happens in the <strong>compositing</strong> phase</li></ul><p><strong>Smooth animations. Happy users.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WdyB2tfs051sUcPH77ZlQg.png" /></figure><h3>Reflow vs Repaint vs Transform (Quick Comparison)</h3><pre>| Change Type        | Triggers Reflow | Triggers Repaint |<br>|--------------------|-----------------|------------------|<br>| top / left         | ✅ Yes          | ✅ Yes           |<br>| width / height     | ✅ Yes          | ✅ Yes           |<br>| margin / padding   | ✅ Yes          | ✅ Yes           |<br>| color              | ❌ No           | ✅ Yes           |<br>| background-color   | ❌ No           | ✅ Yes           |<br>| transform          | ❌ No           | ❌ No            |<br>| opacity            | ❌ No           | ❌ No            |</pre><p><strong>Transform &amp; opacity are your best friends.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac4f1f14bbb2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Is Time to Interactive (TTI) and How to Make Your Page Actually Usable]]></title>
            <link>https://medium.com/@lutfimaulana.fi/what-is-time-to-interactive-tti-and-how-to-make-your-page-actually-usable-2ef9b439f5ec?source=rss-5af674349536------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ef9b439f5ec</guid>
            <dc:creator><![CDATA[Lutfi Maulana]]></dc:creator>
            <pubDate>Tue, 06 Jan 2026 06:44:35 GMT</pubDate>
            <atom:updated>2026-01-06T06:44:35.914Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_Zfzek_fbWcMmHEXTZ90WA.png" /></figure><p>When we talk about performance, most developers focus on <strong>how fast a<br>page loads</strong>.<br>But users don’t care when your HTML finishes downloading.<br>They care about <strong>when they can actually use the page</strong>.<br>That’s where <strong>Time to Interactive (TTI)</strong> comes in.</p><h3>What Is Time to Interactive (TTI)?</h3><p><strong>Time to Interactive (TTI)</strong> measures <strong>how long it takes for a page to become fully responsive to user input</strong>.</p><p>A page is considered <em>interactive</em> when:</p><ul><li>Main content is visible</li><li>Buttons and inputs respond immediately</li><li>Event handlers are attached</li><li>The main thread is free enough to handle interactions</li></ul><h3>Why TTI Matters More Than You Think</h3><p>You’ve probably seen this before:</p><ul><li>The page looks fully loaded</li><li>Buttons are visible</li><li>But clicks don’t work</li><li>Scrolling feels laggy</li><li>Inputs freeze for a moment</li></ul><p>This is <strong>bad TTI</strong>.</p><p>From a user’s perspective, this feels <strong>worse than a slow-loading page</strong> because the UI gives false hope.</p><h3>What Actually Delays TTI?</h3><p>The biggest enemy of TTI is <strong>JavaScript blocking the main thread</strong>.</p><p>Common causes include:</p><ul><li>Large JavaScript bundles</li><li>Long-running tasks</li><li>Heavy React hydration</li><li>Synchronous scripts</li><li>Too many third-party scripts (analytics, chat, ads)</li><li>Complex client-side state initialization</li></ul><h3>TTI in Modern Frameworks (React / Next.js)</h3><p>In frameworks like Next.js:</p><ol><li>Server sends HTML (fast)</li><li>Page becomes visible (good LCP)</li><li>JavaScript downloads</li><li>Hydration runs</li><li>Main thread is blocked</li></ol><p>During step 4, the UI looks ready but <strong>isn’t interactive yet</strong>.<br>This is why TTI can be high even when your page “loads fast”.</p><h3>How to Improve Time to Interactive</h3><h3>1. Ship Less JavaScript</h3><p>Every byte of JavaScript has a cost.</p><ul><li>Remove unused dependencies</li><li>Split bundles</li><li>Avoid large shared chunks</li></ul><p>In Next.js:</p><pre>import dynamic from &#39;next/dynamic&#39;;<br><br>const HeavyComp = dynamic(() =&gt; import(&#39;./HeavyComp&#39;), {<br>  ssr: false,<br>});</pre><h3>2. Avoid Blocking Scripts</h3><p>Never use plain &lt;script&gt; unless absolutely necessary.</p><p>Use defer or async:</p><pre>&lt;script src=&quot;myapp.js&quot; defer&gt;&lt;/script&gt;<br>&lt;script src=&quot;libanalytics.js&quot; async&gt;&lt;/script&gt;</pre><ul><li>defer: waits for HTML parsing, executes in order</li><li>async: loads independently, executes ASAP</li></ul><h3>3. Optimize Hydration</h3><p>In React / Next.js:</p><ul><li>Reduce &quot;use client&quot;</li><li>Prefer Server Components</li><li>Memoize expensive components</li><li>Avoid unnecessary re-renders on mount</li></ul><p>Less hydration work = faster TTI.</p><h3>4. Delay Non-Critical Work</h3><p>Things that <strong>don’t need to block interactivity</strong>:</p><ul><li>Analytics</li><li>Chat widgets</li><li>Marketing scripts</li></ul><p>Load them <strong>after</strong> the page becomes interactive.</p><p>Fast pages aren’t just about loading speed.<br> They’re about <strong>responsiveness</strong>.</p><p>You can have beautiful UI, fast HTML, and perfect LCP — <br> but if JavaScript blocks the main thread, users will still feel frustrated.</p><p>Optimizing Time to Interactive means:</p><ul><li>Shipping less JavaScript</li><li>Prioritizing usability</li><li>Respecting the user’s device</li></ul><p>And that’s what real performance is about.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ef9b439f5ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding <script>, async, and defer in Modern Web Development]]></title>
            <link>https://medium.com/@lutfimaulana.fi/understanding-script-async-and-defer-in-modern-web-development-c45525151651?source=rss-5af674349536------2</link>
            <guid isPermaLink="false">https://medium.com/p/c45525151651</guid>
            <category><![CDATA[lcp]]></category>
            <category><![CDATA[render-blocking]]></category>
            <category><![CDATA[critical-rendering-path]]></category>
            <dc:creator><![CDATA[Lutfi Maulana]]></dc:creator>
            <pubDate>Mon, 05 Jan 2026 04:49:44 GMT</pubDate>
            <atom:updated>2026-01-05T04:50:45.410Z</atom:updated>
            <content:encoded><![CDATA[<h3>Why One &lt;script&gt; Tag Can Make Your Website Feel Slow</h3><p>If you’ve ever opened a website and stared at a white screen for a moment, chances are JavaScript was involved.</p><p>One small line like this:</p><pre>&lt;script src=&quot;test.js&quot;&gt;&lt;/script&gt;</pre><p>can <strong>block your entire page from rendering</strong>.</p><p>Let’s break down why this happens, what async and defer actually do, and how to use them correctly.</p><h3>The Default &lt;script&gt; Is Blocking by Design</h3><p>When the browser parses HTML, it reads from top to bottom.</p><p>The moment it encounters this:</p><pre>&lt;script src=&quot;test.js&quot;&gt;&lt;/script&gt;</pre><p>the browser must:</p><ol><li>Stop parsing HTML</li><li>Download test.js</li><li>Execute test.js</li><li>Resume parsing HTML</li></ol><p>During this time, <strong>nothing below the script exists yet</strong>.</p><p>That’s why we call it a <strong>render-blocking script</strong>.</p><h3>Why Does the Browser Stop Parsing?</h3><p>Because JavaScript can:</p><ul><li>Read the DOM</li><li>Modify elements</li><li>Inject new HTML (document.write)</li><li>Change layout and styles</li></ul><p>If the browser kept parsing HTML while JavaScript executed, the DOM could end up in an inconsistent state.</p><p>So blocking is not a bug — it’s a <strong>safety guarantee</strong>.</p><h3>The Performance Problem</h3><p>Blocking scripts delay:</p><ul><li>First Paint</li><li>Largest Contentful Paint (LCP)</li><li>User interaction</li></ul><p>If your script is in &lt;head&gt;, the user might see <strong>nothing at all</strong> until the JS finishes downloading and executing.</p><p>That’s why performance tools often warn about:</p><p><em>“Eliminate render-blocking resources.”</em></p><h3>Enter defer</h3><pre>&lt;script src=&quot;test.js&quot; defer&gt;&lt;/script&gt;</pre><h3>What defer does:</h3><ul><li>Downloads the script <strong>in parallel</strong> with HTML parsing</li><li>Executes it <strong>after the HTML is fully parsed</strong></li><li>Preserves execution order</li></ul><h3>Best use case:</h3><ul><li>Application logic</li><li>Scripts that need the full DOM</li></ul><p>This is generally safe to use and works well for most frontend apps. ✅</p><h3>Enter async</h3><pre>&lt;script src=&quot;test.js&quot; async&gt;&lt;/script&gt;</pre><h3>What async does:</h3><ul><li>Downloads in parallel</li><li>Executes <strong>immediately once ready</strong></li><li>Does NOT wait for HTML parsing</li><li>Does NOT guarantee execution order</li></ul><h3>Best use case:</h3><ul><li>Analytics</li><li>Tracking</li><li>Ads</li><li>Independent third-party scripts</li></ul><p>Not safe for DOM-dependent code ❌</p><h3>A Common Real-World Bug</h3><pre>&lt;script src=&quot;test.js&quot;&gt;&lt;/script&gt;<br>&lt;div id=&quot;test&quot;&gt;&lt;/div&gt;</pre><pre>document.getElementById(&quot;test&quot;).innerText = &quot;Hello&quot;;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zue2kb_MiXH5-MEPHMYJ9g.png" /></figure><p>test is null because the HTML hasn’t been parsed yet.</p><p>Using defer fixes this instantly.</p><h3>Best Practice</h3><ul><li>Use defer for <strong>your app scripts </strong>✅</li><li>Use async for <strong>third-party scripts </strong>✅</li></ul><p>One small attribute can change:</p><ul><li>How fast your page render</li><li>How users perceive performance</li><li>Your Core Web Vitals score</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c45525151651" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Misconceptions About "use client" in Next.js]]></title>
            <link>https://medium.com/@lutfimaulana.fi/misconceptions-about-use-client-in-next-js-a0e868e3d1f4?source=rss-5af674349536------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0e868e3d1f4</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[scalable-applications]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[frontend]]></category>
            <dc:creator><![CDATA[Lutfi Maulana]]></dc:creator>
            <pubDate>Thu, 18 Dec 2025 23:08:26 GMT</pubDate>
            <atom:updated>2025-12-18T23:10:19.431Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ny7rqyNN57qkOtDYtjoh3A.png" /></figure><p>One of the most common misunderstandings I see in Next.js (especially since the App Router was introduced) is how people interpret the &quot;use client&quot; directive.</p><p>Many developers assume that once a component is marked with &quot;use client&quot;, <strong>everything inside it is handled entirely in the browser</strong>.<br> But that assumption is not fully correct.</p><p>Let’s clarify what &quot;use client&quot; <em>actually</em> does — and what it <strong>does not</strong> do.</p><h3>The Common Misunderstanding</h3><p>You may have heard or thought something like this:</p><blockquote>“If I add <em>&quot;use client&quot;</em>, then the component is rendered on the client only, just like traditional React.”</blockquote><p>This leads to conclusions such as:</p><ul><li>The HTML is generated in the browser</li><li>The server is no longer involved</li><li>It behaves exactly like a CRA</li></ul><p><strong>This is incorrect.</strong></p><h3>The Reality: HTML Is Still Generated on the Server</h3><p>Even when you use &quot;use client&quot;:</p><p>✅ <strong>The initial HTML is still generated on the server</strong><br> ✅ <strong>The server sends fully rendered HTML to the browser</strong><br> ✅ <strong>Hydration still happens on the client</strong></p><p>What &quot;use client&quot; really controls is <strong>where the JavaScript logic runs</strong>, not where the HTML is produced.</p><h3>So What Does &quot;use client&quot; Actually Mean?</h3><p>In Next.js App Router:</p><ul><li>By default, components are <strong>Server Components</strong></li><li>Server Components: Run only on the server, Can access databases, secrets, and server-only APIs, and do not ship JavaScript to the browser.</li></ul><p>When you add &quot;use client&quot; at the top of a file, you are telling Next.js:</p><blockquote>“This component (and its children) needs client-side JavaScript.”</blockquote><p>That’s it.</p><h4>&quot;use client&quot; enables:</h4><ul><li>useState, useEffect, useRef</li><li>Event handlers (onClick, onChange)</li><li>Browser-only APIs (window, document)</li><li>Client-side interactivity</li></ul><p>But it <strong>does not disable server rendering</strong>.</p><h3>What Actually Happens Under the Hood</h3><p>Here’s the simplified flow for a Client Component:</p><h4>Server:</h4><ul><li>Renders the component to HTML</li><li>Sends HTML to the browser</li></ul><h4>Browser:</h4><ul><li>Displays the HTML immediately</li><li>Downloads the JavaScript bundle</li><li>Hydrates the component</li><li>Attaches event listeners</li></ul><p>This is why:</p><ul><li>Your page is fast to first paint</li><li>SEO still works</li><li>You still get SSR benefits</li></ul><p><strong>Simple Example:</strong></p><pre>&quot;use client&quot;;<br><br>export default function Counter() {<br>  const [count, setCount] = useState(0);<br>  return (<br>    &lt;button onClick={() =&gt; setCount(count + 1)}&gt;<br>      Count: {count}<br>    &lt;/button&gt;<br>  );<br>}</pre><p>Even here:</p><ul><li>The <strong>initial HTML</strong> (Count: 0) is rendered on the server</li><li>The <strong>state logic</strong> runs in the browser after hydration</li></ul><p><strong>Key Takeaway</strong></p><blockquote><em>&quot;use client&quot;</em> does <strong>not</strong> mean “everything runs in the browser.”</blockquote><p>It means:</p><ul><li><strong>HTML</strong> → still rendered on the server</li><li><strong>Interactivity &amp; state</strong> → handled in the browser</li></ul><p>Understanding this distinction helps you:</p><ul><li>Make better architectural decisions</li><li>Avoid unnecessary &quot;use client&quot;</li><li>Keep your app fast and scalable</li></ul><h3>Final Thought</h3><p>Think of &quot;use client&quot; as an <strong>opt-in for interactivity</strong>, not an escape hatch from server rendering.</p><p>Once you see it this way, the App Router mental model becomes much clearer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0e868e3d1f4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why you should use MongoDB ?]]></title>
            <link>https://medium.com/@lutfimaulana.fi/why-you-should-use-mongodb-6305405e314b?source=rss-5af674349536------2</link>
            <guid isPermaLink="false">https://medium.com/p/6305405e314b</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[nosql]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Lutfi Maulana]]></dc:creator>
            <pubDate>Mon, 28 Mar 2022 02:11:16 GMT</pubDate>
            <atom:updated>2022-03-28T02:11:16.803Z</atom:updated>
            <content:encoded><![CDATA[<h3>Why you should use MongoDB ?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vde-FX1PIoqgaV4W05sASQ.png" /></figure><p>Hi, this time we will discuss “Why you should use MongoDB ?”, here are the advantages of MongoDB.</p><ol><li><strong>Fast Performance</strong></li></ol><p>MongoDB uses documents in json format to make it lighter, and the database is supported by memcached so it can store data in large memory scales.</p><p><strong>2. Manage Queries Better</strong></p><p>MongoDB can handle queries well and access to data is also easy so you can see the results of a complex data quickly.</p><p><strong>3. Easier Database Management</strong></p><p>MongoDB doesn’t need a table structure that gets more complicated as data grows, MongoDB will automatically create a table structure when you input data.</p><p><strong>4. Capable of Accommodating Lots of Varied Data</strong></p><p>MongoDB uses dynamic schema tables because it can accommodate more complex data. With this data schema, this database can store more varied data, ranging from structured to unstructured data.</p><p><strong>5. Able to Update Data Schema Without Downtime</strong></p><p>MongoDB can still be accessed when schema and data structure updates are made. it will create less disruption to the app or website during the data schema update process.</p><p><strong>6. Scale As Needed</strong></p><p>MongoDB can scale out. if data requirements increase, we can add several cloud servers to increase database capacity.</p><p>so many articles this time, hopefully useful. If you still have questions, please ask anything via the comments column. See you again!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6305405e314b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Advantages of using Next Js]]></title>
            <link>https://medium.com/@lutfimaulana.fi/advantages-of-using-next-js-21e82356cdbf?source=rss-5af674349536------2</link>
            <guid isPermaLink="false">https://medium.com/p/21e82356cdbf</guid>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[typescript]]></category>
            <dc:creator><![CDATA[Lutfi Maulana]]></dc:creator>
            <pubDate>Tue, 22 Mar 2022 22:23:22 GMT</pubDate>
            <atom:updated>2022-03-22T22:23:22.049Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2tmzU7bve-VlTkOMWsk_Hw.jpeg" /></figure><p>Hi, this time we will discuss what are the advantages of Next JS</p><ol><li><strong>SEO Friendly</strong></li></ol><p>The HTML in Next JS is already formed when the browser loads the web page. because it can make it easier for Google to crawl website content in HTML format.</p><p><strong>2. Easy Project Setup</strong></p><p>How to setup a Next Js project can be said to be very easy, even for beginners. just need a Node Js environment, and run a script, no plugins or other libraries needed.</p><p><strong>3. Good Performance</strong></p><p>Next Js has good performance because it implements two functions, namely code splitting and client side navigation.</p><p><strong>4. Easy Project Deploy</strong></p><p>Deploy projects on Next Js is very easy because it integrates with Vercel, a cloud-based deployment platform with full support for Next Js.</p><p>so many articles this time, hopefully useful. If you still have questions, please ask anything via the comments column. See you again!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21e82356cdbf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Are The Features Of  Next Js ?]]></title>
            <link>https://medium.com/@lutfimaulana.fi/what-are-the-features-of-next-js-5f3efc6959d4?source=rss-5af674349536------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f3efc6959d4</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[reactjs]]></category>
            <dc:creator><![CDATA[Lutfi Maulana]]></dc:creator>
            <pubDate>Tue, 22 Mar 2022 16:15:29 GMT</pubDate>
            <atom:updated>2022-03-22T21:53:21.866Z</atom:updated>
            <content:encoded><![CDATA[<h3>What are the features of Next Js ?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2tmzU7bve-VlTkOMWsk_Hw.jpeg" /></figure><p>Hi have you read my previous article about Next Js ? <a href="https://medium.com/@lutfimaulana.fi/what-is-next-js-how-does-next-js-work-5d59bf14ec93">Link</a>, in the previous article I said that Next Js has several excellent features that make it no less than other frameworks, okay these are some of the features of Next Js</p><ol><li><strong>Image Optimization</strong></li></ol><p>Next Js uses the “next/image” image component, which can be used to replace the HTML tag img component. This makes Next Js more suitable for modern website ecosystems.</p><p><strong>2. Layout Component</strong></p><p>Next Js lets you build a page into multiple components. that is, each component can be reused on other pages easily.</p><p><strong>3. Built-in CSS Support</strong></p><p>In Next Js you can import CSS from JavaScript files because it has an advanced build in CSS support feature.</p><p><strong>4. Routing Pages</strong></p><p>Routing in Next Js is all the page files in the pages folder, so we don’t need to create a different routing file anymore.</p><p><strong>5. Fast Refresh</strong></p><p>Next Js can refresh the page quickly if changes are detected in the script.</p><p><strong>6. Static File Serving</strong></p><p>In Next JS we can put the file static files in the public folder. to make it easier when calling and using the static file on certain pages.</p><p><strong>7. Font Optimization</strong></p><p>Next Js can set CSS font inline automatically at build stage. Which can speed up the process of introducing font declarations.</p><p><strong>8. Script Optimization</strong></p><p>In Next.js you can set the loading priority for third-party scripts.<br>For example, based on the order, the top line script will run first.</p><p>so many articles this time, hopefully useful. If you still have questions, please ask anything via the comments column. See you again!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f3efc6959d4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Next JS ? How does Next JS work ?]]></title>
            <link>https://medium.com/@lutfimaulana.fi/what-is-next-js-how-does-next-js-work-5d59bf14ec93?source=rss-5af674349536------2</link>
            <guid isPermaLink="false">https://medium.com/p/5d59bf14ec93</guid>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Lutfi Maulana]]></dc:creator>
            <pubDate>Tue, 22 Mar 2022 15:00:44 GMT</pubDate>
            <atom:updated>2022-03-22T15:00:44.186Z</atom:updated>
            <content:encoded><![CDATA[<h3>What is Next JS ? How does Next JS work ?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2tmzU7bve-VlTkOMWsk_Hw.jpeg" /></figure><p>Next.js is a popular JavaScript-based framework for creating websites. And as a way to simplify the development process, Next.js can be an option.</p><p>Why? Because Next JS has several excellent features that make it no less than other frameworks. Starting from the various optimizations offered to good CSS support.</p><p><strong>What is Next JS ?</strong></p><p>Next.js is a framework built for React.js. This framework managed to fix the shortcomings of React.js, especially in terms of rendering.</p><p><strong>How does Next JS work ?</strong></p><p>The way Next.js works is to render the website on the server so that when the browser requests a page, the server immediately responds by displaying an HTML formatted page.</p><p>Next.js server has prepared a bundle package containing HTML, Javascript and React. So, browsers don’t need to manipulate the DOM of React and JavaScript packages to display HTML.<br>website content can be displayed instantly and users do not need to wait for the rendering process.</p><p>There are 2 types of rendering in Next JS, namely server-side rendering and static-side generator.</p><p><strong>Server Side Rendering (SSR)</strong></p><p>The way server side rendering works is that the server converts the React and JavaScript packages into HTML every time the browser calls the page.</p><p><strong>Static Site Generator (SSG)</strong></p><p>The way the static site generator works is that the server generates HTML pages at the build stage, which is the stage of converting the program code into a complete website, so the server does not generate HTML when the browser calls the page.</p><p>so many articles this time, hopefully useful. If you still have questions, please ask anything via the comments column. See you again!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5d59bf14ec93" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React Context Get Data From API]]></title>
            <link>https://medium.com/@lutfimaulana.fi/react-context-get-data-from-api-5c7b0159970c?source=rss-5af674349536------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c7b0159970c</guid>
            <category><![CDATA[react-js-tutorials]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[api-integration]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[context-api]]></category>
            <dc:creator><![CDATA[Lutfi Maulana]]></dc:creator>
            <pubDate>Mon, 10 Jan 2022 15:59:41 GMT</pubDate>
            <atom:updated>2022-01-10T15:59:41.413Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6inqWKviyC1FAYd5.png" /></figure><p>Hi, today we are going to share how to get data from api in react context, before continue to read this article please read my previous article about react context <a href="https://medium.com/@lutfimaulana.fi/how-to-use-react-context-fd8582d122c1">How to use React Context</a> ok let’s continue..</p><p><strong>Steps</strong></p><ol><li>Open and clone my source from article <a href="https://medium.com/@lutfimaulana.fi/how-to-use-react-context-fd8582d122c1">How to use React Context</a> on specific branch context</li></ol><pre>git clone context <a href="https://github.com/lutfimaulana17/tutorial-reactjs.git">https://github.com/lutfimaulana17/tutorial-reactjs.git</a></pre><p>2. And then open the directory project and install node modules</p><pre>npm install</pre><p>3. After package successfully installed try run the project with command</p><pre>npm run start</pre><p>4. If your project is running well then it will look like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*RxYa_xocjlj8HFM2jWVmaA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*QB77CqnifQ_EJFOte08mkg.png" /></figure><p>5. Open file src/context/User.js and add function request in UserProvider, for the dummy request from api I use <a href="https://jsonplaceholder.typicode.com/users">https://jsonplaceholder.typicode.com/users</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*_uAyu_N2llYs7-HNMusuoQ.png" /></figure><p>6. And don’t forget add state user and loading for save data from the api</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/618/1*66dR5MJ-vlQ_4Bezg6ZVdw.png" /></figure><p>7. And after that add useEffect, add value props provider (user and loading) and call the function request, all code in UserProvider will look like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*ljEBM3VBIoOLonhZn_LcdA.png" /></figure><p>8. And then open file src/UserAuth/index.js, edit file to read data user like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*pOqiw4ryfAG0dkvJxMIdGg.png" /></figure><p>9. Save all file and run the project</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*QesZB4Dwwj1rm3UHyckRmA.png" /></figure><p>we successfully to get and show data user with react context, maybe that’s all I can share about React Context Get Data From API, I have also shared the source of this tutorial on <a href="https://github.com/lutfimaulana17/tutorial-reactjs/tree/get-api-context">github</a> thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c7b0159970c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to use React Context]]></title>
            <link>https://medium.com/@lutfimaulana.fi/how-to-use-react-context-fd8582d122c1?source=rss-5af674349536------2</link>
            <guid isPermaLink="false">https://medium.com/p/fd8582d122c1</guid>
            <category><![CDATA[state-management]]></category>
            <category><![CDATA[contex]]></category>
            <category><![CDATA[redux]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[reactjs]]></category>
            <dc:creator><![CDATA[Lutfi Maulana]]></dc:creator>
            <pubDate>Sun, 09 Jan 2022 16:55:49 GMT</pubDate>
            <atom:updated>2022-01-09T17:03:08.905Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-1ekJ5Onufs2Yu2D.jpeg" /></figure><p><strong>What is context ?</strong></p><p>Context is like global variable that you can access from anywhere without having to parse data on the props component.</p><p><strong>When to use context ?</strong></p><p>I think if you have some data and the data need to be accessible by many components at different nesting levels.</p><p><strong>Let’s try</strong></p><p>So we will try to create simple way to using react context, Let’s go!</p><ol><li><strong>Install React</strong></li></ol><p>first please install react js with command :</p><pre>npm i -g create-react-app</pre><p>2. <strong>Create React Project</strong></p><p>and then you can create the react project with command :</p><pre>npx create-react-app project-name</pre><p>3. <strong>Create Context</strong></p><p>Oke continue to create simple context</p><p>a. create folder user in src folder and create file User.js like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/513/1*3TbJvx_O4e8cHPZAX_1dcg.png" /></figure><p>b. write code in file User.js create variable userContext and put value createContext() import from react like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/464/1*AWhdsO_hl3l6NIivG5uWdg.png" /></figure><p>c. and then create provider as parent in the same file and the all code in file User.js will looks like this, don’t forget to export UserContext and UserProvider in the last line</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*vad3Z169rafPYWkk5EoIRw.png" /></figure><p>4. <strong>Call Data Context</strong></p><p>oke continue to try call data user context from component</p><p>a. create folder sample component “UserAuth”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/353/1*GtUozRYDm7nDGbz7kCQM2A.png" /></figure><p>b. write code in the file index.js in folder UserAuth import useContext from react for get data context and then parse UserContext from file context/User in the useContext, and component UserAuth looks like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/1*HHwmY9qP_LrEhY-JiPu2Pg.png" /></figure><p>c. and then go to to the file App.js change the code import file UserAuth and don’t forget give the wrapper user provider and file App.js looks like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/491/1*hiH_ZfCFkUfu5WGCUd8pXA.png" /></figure><p>and finish you can save all file and run with command</p><pre>npm run start</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/1*FgeSbAkXy3ao9k4t_KrFAA.png" /></figure><p>we successfully tried to create and use react context, maybe that’s all I can share about react context, I have also shared the source of this tutorial on <a href="https://github.com/lutfimaulana17/tutorial-reactjs/tree/context">github</a> thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fd8582d122c1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>