<?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>Forem: Alfredo Salzillo</title>
    <description>The latest articles on Forem by Alfredo Salzillo (@alfredosalzillo).</description>
    <link>https://forem.com/alfredosalzillo</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%2F113263%2F4b0452f3-4a80-4cf9-a053-cf24f283472e.jpg</url>
      <title>Forem: Alfredo Salzillo</title>
      <link>https://forem.com/alfredosalzillo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/alfredosalzillo"/>
    <language>en</language>
    <item>
      <title>Stop Fighting Your Build Config: Building Modular Libraries the Easy Way</title>
      <dc:creator>Alfredo Salzillo</dc:creator>
      <pubDate>Sat, 11 Apr 2026 14:30:31 +0000</pubDate>
      <link>https://forem.com/alfredosalzillo/stop-fighting-your-build-config-building-modular-libraries-the-easy-way-2bpj</link>
      <guid>https://forem.com/alfredosalzillo/stop-fighting-your-build-config-building-modular-libraries-the-easy-way-2bpj</guid>
      <description>&lt;p&gt;If you've ever tried to build a library that exports individual components—think &lt;code&gt;@acme/ui/button&lt;/code&gt; or &lt;code&gt;@acme/utils/date&lt;/code&gt;—you know the pain. Keeping your &lt;code&gt;package.json&lt;/code&gt; exports in sync, managing complex input globs, and maintaining a predictable output structure is a tedious, error-prone manual process.&lt;/p&gt;

&lt;p&gt;Enter &lt;a href="https://www.npmjs.com/package/modular-library" rel="noopener noreferrer"&gt;&lt;strong&gt;modular-library&lt;/strong&gt;&lt;/a&gt;: a zero-config utility designed specifically to generate modular outputs for modern bundlers like Vite, Rollup, and Rolldown.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a "Modular Library"?
&lt;/h2&gt;

&lt;p&gt;Unlike a monolithic library where you import everything from a single entry point, a modular library is split into small, focused modules.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The standard way:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;import { Button } from "my-ui-lib";&lt;/code&gt;&lt;br&gt;
&lt;em&gt;Problem:&lt;/em&gt; Often requires evaluating the full package entry, even if you only need one component.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The modular way:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;import Button from "my-ui-lib/button";&lt;/code&gt;&lt;br&gt;
&lt;em&gt;Solution:&lt;/em&gt; Loads &lt;strong&gt;only&lt;/strong&gt; the code for the button. It’s faster, cleaner, and ensures perfect tree-shaking for the consumer.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why use modular-library?
&lt;/h2&gt;

&lt;p&gt;Building this manually usually means fighting your build tool's configuration as your source tree grows. &lt;code&gt;modular-library&lt;/code&gt; automates the heavy lifting:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Zero-Config&lt;/strong&gt;: It handles the mapping from &lt;code&gt;src/&lt;/code&gt; to &lt;code&gt;dist/&lt;/code&gt; automatically.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Predictable Structure&lt;/strong&gt;: Your output mirrors your input without manual path mapping.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Modern Stack Support&lt;/strong&gt;: Works out of the box with Vite, Rollup, and Rolldown.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CLI Validation&lt;/strong&gt;: Includes a CLI tool to verify that your &lt;code&gt;package.json&lt;/code&gt; exports actually match your build output.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  Quick Start
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;modular-library&lt;/code&gt; requires &lt;strong&gt;Node.js 22&lt;/strong&gt; or newer.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;modular-library
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Using it with Vite
&lt;/h3&gt;

&lt;p&gt;Instead of manually defining every entry point in your &lt;code&gt;vite.config.ts&lt;/code&gt;, you can use the plugin to handle the glob-based inputs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// vite.config.ts&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;defineConfig&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;vite&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;modularLibrary&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;modular-library/vite&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nf"&gt;defineConfig&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;plugins&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;modularLibrary&lt;/span&gt;&lt;span class="p"&gt;()],&lt;/span&gt;
  &lt;span class="na"&gt;build&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;lib&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;entry&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;src/**/*.ts&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
      &lt;span class="na"&gt;formats&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;es&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Making it Consumable
&lt;/h3&gt;

&lt;p&gt;To let users import your modules easily, add an &lt;code&gt;exports&lt;/code&gt; map to your &lt;code&gt;package.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"exports"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"./*"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"./dist/*.js"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The "Check" Command
&lt;/h2&gt;

&lt;p&gt;One of the coolest features is the built-in CLI. After you run your build, you can validate that your exports are correct and that no files are missing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx modular-library check
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This prevents the "broken package" scenario where you ship a library but a subpath import fails because the file wasn't generated correctly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Customizing your Output
&lt;/h2&gt;

&lt;p&gt;If you need to change how the paths are generated (for example, putting everything in a &lt;code&gt;modules/\&lt;/code&gt; folder), the plugin provides a simple &lt;code&gt;transformOutputPath\&lt;/code&gt; hook:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;plugins&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="nf"&gt;modularLibrary&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;relative&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;src/&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// The base path to strip&lt;/span&gt;
    &lt;span class="na"&gt;transformOutputPath&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="s2"&gt;`modules/&lt;/span&gt;&lt;span class="se"&gt;\$&lt;/span&gt;&lt;span class="s2"&gt;{path}&lt;/span&gt;&lt;span class="se"&gt;\`&lt;/span&gt;&lt;span class="s2"&gt;,
  }),
],
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The goal of &lt;code&gt;modular-library&lt;/code&gt; is to let you focus on writing code instead of managing build artifacts. By automating the sync between your source files and your distribution targets, it makes maintaining a high-performance, tree-shakeable library accessible to everyone.&lt;/p&gt;

&lt;p&gt;Check out the source on &lt;a href="https://github.com/alfredosalzillo/modular-library" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; and start modularizing your workflow!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Found this helpful? Follow me for more insights on modern JavaScript tooling and library development!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>vite</category>
      <category>rolldown</category>
    </item>
    <item>
      <title>Building a Generative Art Game with React: Blobs - Dead or Alive</title>
      <dc:creator>Alfredo Salzillo</dc:creator>
      <pubDate>Sat, 07 Feb 2026 12:03:56 +0000</pubDate>
      <link>https://forem.com/alfredosalzillo/building-a-generative-art-game-with-react-blobs-dead-or-alive-jf5</link>
      <guid>https://forem.com/alfredosalzillo/building-a-generative-art-game-with-react-blobs-dead-or-alive-jf5</guid>
      <description>&lt;h2&gt;
  
  
  🎨 Blobs: Dead or Alive?
&lt;/h2&gt;

&lt;p&gt;Have you ever looked at a random SVG shape and thought, "That looks like it has a personality"? &lt;/p&gt;

&lt;p&gt;That’s exactly how &lt;strong&gt;Blobs - Dead or Alive&lt;/strong&gt; was born. What started as a generative art experiment turned into a fully functional skill game where you hunt for specific, procedurally generated "blobs" before the timer runs out.&lt;/p&gt;

&lt;p&gt;In this post, we’ll look at the technical "DNA" of these blobs and how React powers the game engine.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧬 The Secret Sauce: Generative Anatomy
&lt;/h2&gt;

&lt;p&gt;The most impressive part of &lt;a href="https://github.com/alfredosalzillo/blobs-dead-or-alive" rel="noopener noreferrer"&gt;Alfredo Salzillo's project&lt;/a&gt; is the &lt;strong&gt;Generative Blob Engine&lt;/strong&gt;. Every blob is rendered on the fly using SVGs.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The Geometry
&lt;/h3&gt;

&lt;p&gt;A blob isn't just a circle; it’s a set of random points connected via splines. By calculating points around a center and adding a "randomness factor" to their distance from the origin, we get that organic, wobbly shape.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. The Traits
&lt;/h3&gt;

&lt;p&gt;The generator assigns specific traits to each instance:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Eyes:&lt;/strong&gt; Varies between single (cyclops) and double.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Color Palette:&lt;/strong&gt; Randomized "cute" pastels.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Animations:&lt;/strong&gt; Blobs use CSS transitions to "look around" or shake when clicked.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🛠️ The Tech Stack
&lt;/h2&gt;

&lt;p&gt;The project leverages a modern web stack to ensure performance:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;React &amp;amp; TypeScript:&lt;/strong&gt; For predictable UI state and type safety.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SCSS:&lt;/strong&gt; To handle the complex animations and transitions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Capacitor:&lt;/strong&gt; The repository includes configurations for Android, allowing the game to live on the Google Play Store.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Technical Insight:&lt;/strong&gt; Managing dozens of unique, animated SVGs in React can be taxing. This project handles it efficiently by isolating the "Blob" component and using optimized state updates to prevent unnecessary re-renders of the entire grid.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🎮 Play it Yourself!
&lt;/h2&gt;

&lt;p&gt;The project is fully open-source. Whether you want to learn how to handle SVG manipulation in React or just want to challenge your eyes, check it out:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/alfredosalzillo/blobs-dead-or-alive" rel="noopener noreferrer"&gt;alfredosalzillo/blobs-dead-or-alive&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live Demo:&lt;/strong&gt; &lt;a href="https://alfredosalzillo.github.io/blobs-dead-or-alive/" rel="noopener noreferrer"&gt;Play on the Web&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;

&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/alfredosalzillo" rel="noopener noreferrer"&gt;
        alfredosalzillo
      &lt;/a&gt; / &lt;a href="https://github.com/alfredosalzillo/blobs-dead-or-alive" rel="noopener noreferrer"&gt;
        blobs-dead-or-alive
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A Blobs game.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://raw.githubusercontent.com/alfredosalzillo/blobs-dead-or-alive/master/public/assets/icon.svg"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Falfredosalzillo%2Fblobs-dead-or-alive%2Fmaster%2Fpublic%2Fassets%2Ficon.svg" alt="icon" width="24"&gt;&lt;/a&gt; Blobs Dead or Alive&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;A fast-paced "Find the Blob" game built with React, Next.js, and generative art.&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/alfredosalzillo/blobs-dead-or-alive/./public/assets/wanted-preview.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Falfredosalzillo%2Fblobs-dead-or-alive%2F.%2Fpublic%2Fassets%2Fwanted-preview.png" alt="preview"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;🎮 How to Play&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;Try it on the &lt;a href="http://alfredosalzillo.me/blobs-dead-or-alive/" rel="nofollow noopener noreferrer"&gt;Web&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The goal is simple: find the "Wanted" blob among a crowd of similar-looking blobs before time runs out!&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;✨ Features&lt;/h2&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Generative Art&lt;/strong&gt;: Every blob is uniquely generated with different shapes, colors, and features.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rush Mode&lt;/strong&gt;: Test your speed in an endless survival mode.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Campaign Mode&lt;/strong&gt;: Progress through increasingly difficult stages (Coming Soon).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Progressive Web App (PWA)&lt;/strong&gt;: Install it on your device for an app-like experience.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-Platform&lt;/strong&gt;: Available on Web and Android (via TWA).&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;🛠️ Tech Stack&lt;/h2&gt;

&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Framework&lt;/strong&gt;: &lt;a href="https://nextjs.org/" rel="nofollow noopener noreferrer"&gt;Next.js 15+&lt;/a&gt; (App Router)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Library&lt;/strong&gt;: &lt;a href="https://react.dev/" rel="nofollow noopener noreferrer"&gt;React 19&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Styling&lt;/strong&gt;: &lt;a href="https://sass-lang.com/" rel="nofollow noopener noreferrer"&gt;SASS&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Linter/Formatter&lt;/strong&gt;: &lt;a href="https://biomejs.dev/" rel="nofollow noopener noreferrer"&gt;Biome&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PWA&lt;/strong&gt;: &lt;code&gt;@ducanh2912/next-pwa&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend/Analytics&lt;/strong&gt;: &lt;a href="https://firebase.google.com/" rel="nofollow noopener noreferrer"&gt;Firebase&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;🚀 Getting Started&lt;/h2&gt;

&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Prerequisites&lt;/h3&gt;

&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Node.js 18+&lt;/li&gt;
&lt;li&gt;npm or yarn&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Installation&lt;/h3&gt;

&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Clone the repository:&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;git clone https://github.com/alfredosalzillo/blobs-dead-or-alive.git
&lt;span class="pl-c1"&gt;cd&lt;/span&gt; blobs-dead-or-alive&lt;/pre&gt;

&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Install dependencies:&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;…
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/alfredosalzillo/blobs-dead-or-alive" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;







&lt;h3&gt;
  
  
  What's Next?
&lt;/h3&gt;

&lt;p&gt;Building characters out of math is a great way to learn SVG paths and React animation. What would you add to these blobs? Hats? Mustaches?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let me know in the comments!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>typescript</category>
      <category>generativeart</category>
      <category>webdev</category>
    </item>
    <item>
      <title>[Boost]</title>
      <dc:creator>Alfredo Salzillo</dc:creator>
      <pubDate>Mon, 19 Jan 2026 14:36:12 +0000</pubDate>
      <link>https://forem.com/alfredosalzillo/-3j37</link>
      <guid>https://forem.com/alfredosalzillo/-3j37</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/alfredosalzillo" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&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%2Fuser%2Fprofile_image%2F113263%2F4b0452f3-4a80-4cf9-a053-cf24f283472e.jpg" alt="alfredosalzillo"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/alfredosalzillo/level-up-your-markdown-embedding-dynamic-content-with-remark-react-liquid-tag-27ol" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Embedding Dynamic Content with remark-react-liquid-tag&lt;/h2&gt;
      &lt;h3&gt;Alfredo Salzillo ・ Mar 18 '25&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#react&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#markdown&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#typescript&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;


</description>
      <category>react</category>
      <category>markdown</category>
      <category>typescript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>[Boost]</title>
      <dc:creator>Alfredo Salzillo</dc:creator>
      <pubDate>Sat, 16 Aug 2025 10:55:11 +0000</pubDate>
      <link>https://forem.com/alfredosalzillo/-19a8</link>
      <guid>https://forem.com/alfredosalzillo/-19a8</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/alfredosalzillo/redis-pixel-war-3i7a" class="crayons-story__hidden-navigation-link"&gt;Redis Pixel War&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
      &lt;a href="https://dev.to/alfredosalzillo/redis-pixel-war-3i7a" class="crayons-article__context-note crayons-article__context-note__feed"&gt;&lt;p&gt;Redis AI Challenge: Beyond the Cache&lt;/p&gt;

&lt;/a&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/alfredosalzillo" class="crayons-avatar  crayons-avatar--l  "&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%2Fuser%2Fprofile_image%2F113263%2F4b0452f3-4a80-4cf9-a053-cf24f283472e.jpg" alt="alfredosalzillo profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/alfredosalzillo" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Alfredo Salzillo
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Alfredo Salzillo
                
              
              &lt;div id="story-author-preview-content-2763133" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/alfredosalzillo" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F113263%2F4b0452f3-4a80-4cf9-a053-cf24f283472e.jpg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Alfredo Salzillo&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/alfredosalzillo/redis-pixel-war-3i7a" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Aug 10 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/alfredosalzillo/redis-pixel-war-3i7a" id="article-link-2763133"&gt;
          Redis Pixel War
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/redischallenge"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;redischallenge&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/devchallenge"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;devchallenge&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/database"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;database&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/ai"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;ai&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/alfredosalzillo/redis-pixel-war-3i7a" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/exploding-head-daceb38d627e6ae9b730f36a1e390fca556a4289d5a41abb2c35068ad3e2c4b5.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/multi-unicorn-b44d6f8c23cdd00964192bedc38af3e82463978aa611b4365bd33a0f1f4f3e97.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;14&lt;span class="hidden s:inline"&gt; reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/alfredosalzillo/redis-pixel-war-3i7a#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              &lt;span class="hidden s:inline"&gt;Add Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            2 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>redischallenge</category>
      <category>devchallenge</category>
      <category>database</category>
      <category>ai</category>
    </item>
    <item>
      <title>[Boost]</title>
      <dc:creator>Alfredo Salzillo</dc:creator>
      <pubDate>Wed, 13 Aug 2025 07:06:12 +0000</pubDate>
      <link>https://forem.com/alfredosalzillo/-1i5i</link>
      <guid>https://forem.com/alfredosalzillo/-1i5i</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/alfredosalzillo/redis-pixel-war-3i7a" class="crayons-story__hidden-navigation-link"&gt;Redis Pixel War&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
      &lt;a href="https://dev.to/alfredosalzillo/redis-pixel-war-3i7a" class="crayons-article__context-note crayons-article__context-note__feed"&gt;&lt;p&gt;Redis AI Challenge: Beyond the Cache&lt;/p&gt;

&lt;/a&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/alfredosalzillo" class="crayons-avatar  crayons-avatar--l  "&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%2Fuser%2Fprofile_image%2F113263%2F4b0452f3-4a80-4cf9-a053-cf24f283472e.jpg" alt="alfredosalzillo profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/alfredosalzillo" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Alfredo Salzillo
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Alfredo Salzillo
                
              
              &lt;div id="story-author-preview-content-2763133" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/alfredosalzillo" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F113263%2F4b0452f3-4a80-4cf9-a053-cf24f283472e.jpg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Alfredo Salzillo&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/alfredosalzillo/redis-pixel-war-3i7a" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Aug 10 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/alfredosalzillo/redis-pixel-war-3i7a" id="article-link-2763133"&gt;
          Redis Pixel War
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/redischallenge"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;redischallenge&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/devchallenge"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;devchallenge&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/database"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;database&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/ai"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;ai&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/alfredosalzillo/redis-pixel-war-3i7a" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/exploding-head-daceb38d627e6ae9b730f36a1e390fca556a4289d5a41abb2c35068ad3e2c4b5.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/multi-unicorn-b44d6f8c23cdd00964192bedc38af3e82463978aa611b4365bd33a0f1f4f3e97.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;14&lt;span class="hidden s:inline"&gt; reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/alfredosalzillo/redis-pixel-war-3i7a#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              &lt;span class="hidden s:inline"&gt;Add Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            2 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>redischallenge</category>
      <category>devchallenge</category>
      <category>database</category>
      <category>ai</category>
    </item>
    <item>
      <title>[Boost]</title>
      <dc:creator>Alfredo Salzillo</dc:creator>
      <pubDate>Sun, 10 Aug 2025 14:53:24 +0000</pubDate>
      <link>https://forem.com/alfredosalzillo/-40f7</link>
      <guid>https://forem.com/alfredosalzillo/-40f7</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/alfredosalzillo/redis-pixel-war-3i7a" class="crayons-story__hidden-navigation-link"&gt;Redis Pixel War&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
      &lt;a href="https://dev.to/alfredosalzillo/redis-pixel-war-3i7a" class="crayons-article__context-note crayons-article__context-note__feed"&gt;&lt;p&gt;Redis AI Challenge: Beyond the Cache&lt;/p&gt;

&lt;/a&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/alfredosalzillo" class="crayons-avatar  crayons-avatar--l  "&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%2Fuser%2Fprofile_image%2F113263%2F4b0452f3-4a80-4cf9-a053-cf24f283472e.jpg" alt="alfredosalzillo profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/alfredosalzillo" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Alfredo Salzillo
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Alfredo Salzillo
                
              
              &lt;div id="story-author-preview-content-2763133" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/alfredosalzillo" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F113263%2F4b0452f3-4a80-4cf9-a053-cf24f283472e.jpg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Alfredo Salzillo&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/alfredosalzillo/redis-pixel-war-3i7a" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Aug 10 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/alfredosalzillo/redis-pixel-war-3i7a" id="article-link-2763133"&gt;
          Redis Pixel War
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/redischallenge"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;redischallenge&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/devchallenge"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;devchallenge&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/database"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;database&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/ai"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;ai&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/alfredosalzillo/redis-pixel-war-3i7a" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/exploding-head-daceb38d627e6ae9b730f36a1e390fca556a4289d5a41abb2c35068ad3e2c4b5.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/multi-unicorn-b44d6f8c23cdd00964192bedc38af3e82463978aa611b4365bd33a0f1f4f3e97.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;14&lt;span class="hidden s:inline"&gt; reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/alfredosalzillo/redis-pixel-war-3i7a#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              &lt;span class="hidden s:inline"&gt;Add Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            2 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>redischallenge</category>
      <category>devchallenge</category>
      <category>database</category>
      <category>ai</category>
    </item>
    <item>
      <title>Redis Pixel War</title>
      <dc:creator>Alfredo Salzillo</dc:creator>
      <pubDate>Sun, 10 Aug 2025 13:28:55 +0000</pubDate>
      <link>https://forem.com/alfredosalzillo/redis-pixel-war-3i7a</link>
      <guid>https://forem.com/alfredosalzillo/redis-pixel-war-3i7a</guid>
      <description>&lt;p&gt;This is a submission for the Redis AI Challenge: Beyond the Cache.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;Redis Pixel War is a live, collaborative “pixel war” built on Next.js where anyone can paint single pixels on a 100×100 canvas. It showcases Redis 8 as a multi‑model, real‑time platform rather than just a cache. Every pixel change is persisted, broadcast to all connected clients, and recorded for history and stats.&lt;/p&gt;

&lt;p&gt;Highlights:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Real‑time updates to all clients via Server‑Sent Events (SSE) powered by Redis Pub/Sub.&lt;/li&gt;
&lt;li&gt;Durable primary storage of the canvas in Redis Hashes.&lt;/li&gt;
&lt;li&gt;Presence tracking (who’s online) with Redis Sorted Sets and a Users Hash.&lt;/li&gt;
&lt;li&gt;Audit/history of changes with a Redis Stream to enable time‑travel/replay or analytics.&lt;/li&gt;
&lt;li&gt;Leaderboards and per‑user stats computed from Redis data.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Stack: Next.js (App Router), TypeScript, MUI, Redis 8 (node-redis).&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Remote app: &lt;a href="https://redis-challenge.vercel.app/" rel="noopener noreferrer"&gt;https://redis-challenge.vercel.app/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Screenshots: &lt;/li&gt;
&lt;/ul&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%2Fmx8yoemb55h58d9u7aby.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%2Fmx8yoemb55h58d9u7aby.png" alt="Screenshot 1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Code
&lt;/h3&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/alfredosalzillo" rel="noopener noreferrer"&gt;
        alfredosalzillo
      &lt;/a&gt; / &lt;a href="https://github.com/alfredosalzillo/redis-challenge" rel="noopener noreferrer"&gt;
        redis-challenge
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Redis Pixel War&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;A live, collaborative pixel war showcasing Redis as a multi‑model platform:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Primary storage: Redis Hash stores pixel colors.&lt;/li&gt;
&lt;li&gt;Real‑time: Redis Pub/Sub broadcasts pixel updates consumed by Server‑Sent Events (SSE).&lt;/li&gt;
&lt;li&gt;History/Audit: Each update is appended to a Redis Stream.&lt;/li&gt;
&lt;li&gt;Presence: Redis ZSET + HASH track who is online and their display names.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Built with Next.js (App Router) and MUI.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Getting Started&lt;/h2&gt;
&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Prerequisites:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Node.js 18+&lt;/li&gt;
&lt;li&gt;A Redis instance (local or hosted). Set REDIS_URL env var like &lt;code&gt;redis://localhost:6379&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Install dependencies:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;npm install&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run the dev server:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;REDIS_URL=redis://localhost:6379 npm run dev&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Open the app:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://localhost:3000" rel="nofollow noopener noreferrer"&gt;http://localhost:3000&lt;/a&gt; (the game runs on the home page)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;How it works&lt;/h2&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Storage
&lt;ul&gt;
&lt;li&gt;Key &lt;code&gt;canvas:colors&lt;/code&gt; (Hash): maps pixel index to hex color. The pixel index is computed as &lt;code&gt;idx = y * WIDTH + x&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Key &lt;code&gt;canvas:owners&lt;/code&gt; (Hash): optional mapping from pixel index to the userId who last painted it.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Real‑time updates
&lt;ul&gt;
&lt;li&gt;Pub/Sub channel &lt;code&gt;canvas:updates&lt;/code&gt;…&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/alfredosalzillo/redis-challenge" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  How I Used Redis 8 (Beyond Caching)
&lt;/h2&gt;

&lt;p&gt;Redis is the system of record for the app and is used across multiple data models:&lt;/p&gt;

&lt;p&gt;1) Primary storage (Hash)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Key &lt;code&gt;canvas:colors&lt;/code&gt; stores pixel color by index: &lt;code&gt;HSET canvas:colors &amp;lt;idx&amp;gt; &amp;lt;#hex&amp;gt;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Key &lt;code&gt;canvas:owners&lt;/code&gt; optionally stores the user who last painted each pixel.&lt;/li&gt;
&lt;li&gt;Bootstrap endpoint &lt;code&gt;GET /api/bootstrap&lt;/code&gt; uses HSCAN to stream initial colors to the client.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;2) Real‑time messaging (Pub/Sub + SSE)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Channel &lt;code&gt;canvas:updates&lt;/code&gt; publishes every pixel change as JSON &lt;code&gt;{ x, y, idx, color, userId, at }&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Server subscribes and relays messages to browsers via SSE at &lt;code&gt;GET /api/stream&lt;/code&gt; with event type &lt;code&gt;pixel&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;A lightweight &lt;code&gt;presence&lt;/code&gt; SSE event nudges clients to refresh presence periodically.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;3) Presence (ZSET + HASH)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ZSET &lt;code&gt;presence:online&lt;/code&gt; stores last‑seen timestamps (score = ms since epoch, member = userId).&lt;/li&gt;
&lt;li&gt;HASH &lt;code&gt;presence:users&lt;/code&gt; maps userId -&amp;gt; display name.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;POST /api/presence/heartbeat&lt;/code&gt; updates ZSET and (optionally) the name in HASH.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;GET /api/users/online&lt;/code&gt; prunes stale users (older than 30s) and returns the current online list.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;4) History/Audit (Stream)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Stream &lt;code&gt;stream:canvas&lt;/code&gt; receives an entry per pixel change (x, y, idx, color, userId, at).&lt;/li&gt;
&lt;li&gt;This enables later analysis, replay, or moderation if needed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;5) Stats/Leaderboards&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;GET /api/users/top&lt;/code&gt; calculates top painters by scanning &lt;code&gt;canvas:owners&lt;/code&gt; and enriching names from &lt;code&gt;presence:users&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;GET /api/users/me?id=...&lt;/code&gt; returns per‑user counts and board percentage.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Why Redis 8?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Combines multiple capabilities (Hashes, Pub/Sub, Streams, Sorted Sets) in one low‑latency system.&lt;/li&gt;
&lt;li&gt;Simplifies architecture: no separate DB, broker, and metrics store — Redis handles them all.&lt;/li&gt;
&lt;li&gt;Fast HSCAN and pub/sub deliver a snappy UX even as the board grows.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Architecture
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Frontend: Next.js (App Router) + MUI; HTML5 Canvas for pixel rendering.&lt;/li&gt;
&lt;li&gt;Backend: Next.js API routes.&lt;/li&gt;
&lt;li&gt;Realtime: SSE endpoint subscribes to Redis Pub/Sub.&lt;/li&gt;
&lt;li&gt;Data: Redis 8 as primary data store and event bus.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Credits
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Solo project for the Redis AI Challenge.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Last updated: 2025-08-10.&lt;/p&gt;

</description>
      <category>redischallenge</category>
      <category>devchallenge</category>
      <category>database</category>
      <category>ai</category>
    </item>
    <item>
      <title>[Boost]</title>
      <dc:creator>Alfredo Salzillo</dc:creator>
      <pubDate>Wed, 19 Mar 2025 06:03:49 +0000</pubDate>
      <link>https://forem.com/alfredosalzillo/-4ij2</link>
      <guid>https://forem.com/alfredosalzillo/-4ij2</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/alfredosalzillo" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&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%2Fuser%2Fprofile_image%2F113263%2F4b0452f3-4a80-4cf9-a053-cf24f283472e.jpg" alt="alfredosalzillo"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/alfredosalzillo/level-up-your-markdown-embedding-dynamic-content-with-remark-react-liquid-tag-27ol" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Level Up Your Markdown: Embedding Dynamic Content with remark-react-liquid-tag&lt;/h2&gt;
      &lt;h3&gt;Alfredo Salzillo ・ Mar 18&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#react&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#markdown&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#typescript&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;


</description>
      <category>react</category>
      <category>markdown</category>
      <category>typescript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Embedding Dynamic Content with remark-react-liquid-tag</title>
      <dc:creator>Alfredo Salzillo</dc:creator>
      <pubDate>Tue, 18 Mar 2025 14:48:59 +0000</pubDate>
      <link>https://forem.com/alfredosalzillo/level-up-your-markdown-embedding-dynamic-content-with-remark-react-liquid-tag-27ol</link>
      <guid>https://forem.com/alfredosalzillo/level-up-your-markdown-embedding-dynamic-content-with-remark-react-liquid-tag-27ol</guid>
      <description>&lt;p&gt;In the world of web development, Markdown has become a ubiquitous language for creating content. Its simplicity and readability make it a favorite for everything from documentation to blog posts. However, sometimes static Markdown isn't enough. You might want to embed dynamic content like videos, social media posts, or interactive elements directly within your Markdown.&lt;/p&gt;

&lt;p&gt;Enter &lt;code&gt;remark-react-liquid-tag&lt;/code&gt;, a clever little plugin that bridges the gap between static Markdown and dynamic React components. Inspired by the popular &lt;code&gt;dev.to&lt;/code&gt; platform, this plugin allows you to leverage the power of "liquid tags" within your Markdown, bringing a new level of interactivity to your content.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Inspiration: Liquid Tags on &lt;code&gt;dev.to&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;If you've ever written or read an article on &lt;code&gt;dev.to&lt;/code&gt;, you might have noticed the neat way they embed content from various platforms. They achieve this using liquid tags – special elements enclosed in &lt;code&gt;{% %}&lt;/code&gt; syntax. These tags act as placeholders that are later replaced with dynamic content.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;remark-react-liquid-tag&lt;/code&gt; brings this same concept to your React-based Markdown rendering pipeline. It allows you to define custom tags that, when processed, will render specific React components, effectively embedding dynamic functionality within your static Markdown.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it Works: Bridging Markdown and React
&lt;/h2&gt;

&lt;p&gt;This plugin is built as an extension for &lt;a href="https://github.com/remarkjs/remark" rel="noopener noreferrer"&gt;remark&lt;/a&gt;, a powerful Markdown processor. When used in conjunction with &lt;a href="https://github.com/remarkjs/react-remark" rel="noopener noreferrer"&gt;react-remark&lt;/a&gt; (a library for rendering Markdown as React components), &lt;code&gt;remark-react-liquid-tag&lt;/code&gt; parses your Markdown for these special liquid tags.&lt;/p&gt;

&lt;p&gt;Upon encountering a tag, the plugin extracts the tag's type, any associated URL, options, and configuration. This information is then passed as props to a designated React component, which is responsible for rendering the dynamic content.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started: Installation and Basic Usage
&lt;/h2&gt;

&lt;p&gt;Integrating &lt;code&gt;remark-react-liquid-tag&lt;/code&gt; into your project is straightforward. If you're already using &lt;code&gt;react-remark&lt;/code&gt;, the setup is particularly smooth.&lt;/p&gt;

&lt;p&gt;First, install the plugin using npm:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;remark-react-liquid-tag
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Next, in your React component where you're using &lt;code&gt;react-remark&lt;/code&gt;, you'll need to include the plugin in your &lt;code&gt;remarkPlugins&lt;/code&gt; array. You'll also need to provide a React component that will handle the rendering of your liquid tags.&lt;/p&gt;

&lt;p&gt;Here's a basic example based on the README:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Fragment&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useRemark&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react-remark&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;remarkGemoji&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;remark-gemoji&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;rehypeSlug&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;rehype-slug&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;rehypeAutoLinkHeadings&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;rehype-autolink-headings&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;reactLiquidTag&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;RemarkReactLiquidTagProps&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;remark-react-liquid-tag&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;LiquidTag&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;FC&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;RemarkReactLiquidTagProps&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;switch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;youtube&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;iframe&lt;/span&gt;
          &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"560"&lt;/span&gt;
          &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"315"&lt;/span&gt;
          &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;`https://www.youtube.com/embed/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
          &lt;span class="na"&gt;frameBorder&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt;
          &lt;span class="na"&gt;allow&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"&lt;/span&gt;
          &lt;span class="na"&gt;allowFullScreen&lt;/span&gt;
        &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nl"&gt;default&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Fragment&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// ...&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Remark&lt;/span&gt;
  &lt;span class="na"&gt;remarkPlugins&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;remarkGemoji&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;reactLiquidTag&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;component&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;LiquidTag&lt;/span&gt; &lt;span class="p"&gt;}]]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;remarkToRehypeOptions&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;allowDangerousHtml&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;rehypePlugins&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;rehypeSlug&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;rehypeAutoLinkHeadings&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;`
    This is youtube video:
    {% youtube dQw4w9WgXcQ %}

    This is a unsupported tag:
    {% unsupported_tag %}
  `&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Remark&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Customizing Your Liquid Tags
&lt;/h2&gt;

&lt;p&gt;The beauty of &lt;code&gt;remark-react-liquid-tag&lt;/code&gt; lies in its flexibility. You can define your own custom liquid tags and the corresponding React components that will render them.&lt;/p&gt;

&lt;p&gt;The plugin offers an &lt;code&gt;options&lt;/code&gt; object where you can configure its behavior:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;component&lt;/code&gt;&lt;/strong&gt;: This option lets you specify the React component that will handle the rendering of all your liquid tags. This component receives props like &lt;code&gt;type&lt;/code&gt;, &lt;code&gt;url&lt;/code&gt;, &lt;code&gt;options&lt;/code&gt; (for additional parameters within the tag), and &lt;code&gt;config&lt;/code&gt; (for type-specific configurations).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;config&lt;/code&gt;&lt;/strong&gt;: This option allows you to provide specific configurations for different types of liquid tags. This can be useful for passing in API keys or other settings.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For instance, you could define a liquid tag for embedding tweets:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;Check out this tweet: {% tweet 1234567890 %}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;And then, within your custom component, you would handle the &lt;code&gt;tweet&lt;/code&gt; type by fetching and rendering the tweet using a Twitter embedding library.&lt;/p&gt;
&lt;h2&gt;
  
  
  Benefits and Use Cases
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;remark-react-liquid-tag&lt;/code&gt; offers several advantages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Enhanced Markdown Functionality&lt;/strong&gt;: It extends the capabilities of Markdown, allowing you to embed dynamic content without resorting to raw HTML.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clean Separation of Concerns&lt;/strong&gt;: Your Markdown content remains focused on the text, while the rendering logic for dynamic elements resides in your React components.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reusability&lt;/strong&gt;: The React components you create for rendering liquid tags can be reused across your application.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inspired by a Proven Solution&lt;/strong&gt;: The concept is based on the successful implementation of liquid tags on &lt;code&gt;dev.to&lt;/code&gt;, suggesting its effectiveness and user-friendliness.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This plugin is particularly useful for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Blog platforms&lt;/strong&gt;: Embedding videos, social media posts, code sandboxes, and other interactive elements.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Documentation sites&lt;/strong&gt;: Integrating live demos, interactive tutorials, and API explorers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Content management systems&lt;/strong&gt;: Providing content creators with an easy way to embed rich media without needing to write complex code.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;remark-react-liquid-tag&lt;/code&gt; is a powerful and elegant solution for bringing dynamic content to your Markdown-driven React applications. By embracing the concept of liquid tags, it offers a clean, intuitive, and extensible way to embed interactive elements and enhance the richness of your content. If you're looking to level up your Markdown and provide a more engaging experience for your users, this plugin is definitely worth exploring.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fassets.dev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/alfredosalzillo" rel="noopener noreferrer"&gt;
        alfredosalzillo
      &lt;/a&gt; / &lt;a href="https://github.com/alfredosalzillo/remark-react-liquid-tag" rel="noopener noreferrer"&gt;
        remark-react-liquid-tag
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A remark plugin that allows the usage of liquid tags.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;remark-react-liquid-tag&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;This is a &lt;a href="https://github.com/remarkjs/remark" rel="noopener noreferrer"&gt;remark&lt;/a&gt;
plugin that allows the usage of liquid tags.&lt;/p&gt;
&lt;p&gt;This idea came from the usage of liquid tags in &lt;a href="https://dev.to/" rel="nofollow"&gt;dev.to (DEV COMMUNITY)&lt;/a&gt; platform for embedding
services in markdowns
&lt;a href="https://docs.dev.to/frontend/liquid-tags/" rel="nofollow"&gt;This documented page&lt;/a&gt; shows their idea behind liquid tags and the tags available.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Liquid tags&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;Liquid tags are special elements to use in markdown.
They are custom embeds that are added via a &lt;code&gt;{% %}&lt;/code&gt; syntax.
&lt;a href="https://shopify.github.io/liquid/" rel="nofollow noopener noreferrer"&gt;Liquid&lt;/a&gt; is a templating language developed by Shopify.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Installation&lt;/h2&gt;

&lt;/div&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;npm install remark-react-liquid-tag&lt;/pre&gt;

&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Usage&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;Usage with &lt;a href="https://github.com/remarkjs/react-remark" rel="noopener noreferrer"&gt;react-remark&lt;/a&gt;&lt;/p&gt;
&lt;div class="highlight highlight-source-tsx notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;&lt;span class="pl-k"&gt;import&lt;/span&gt; &lt;span class="pl-v"&gt;React&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-kos"&gt;{&lt;/span&gt; &lt;span class="pl-v"&gt;Fragment&lt;/span&gt; &lt;span class="pl-kos"&gt;}&lt;/span&gt; &lt;span class="pl-k"&gt;from&lt;/span&gt; &lt;span class="pl-s"&gt;'react'&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt;
&lt;span class="pl-k"&gt;import&lt;/span&gt; &lt;span class="pl-kos"&gt;{&lt;/span&gt; &lt;span class="pl-s1"&gt;useRemark&lt;/span&gt; &lt;span class="pl-kos"&gt;}&lt;/span&gt; &lt;span class="pl-k"&gt;from&lt;/span&gt; &lt;span class="pl-s"&gt;'react-remark'&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt;
&lt;span class="pl-k"&gt;import&lt;/span&gt; &lt;span class="pl-s1"&gt;remarkGemoji&lt;/span&gt; &lt;span class="pl-k"&gt;from&lt;/span&gt; &lt;span class="pl-s"&gt;'remark-gemoji'&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt;
&lt;span class="pl-k"&gt;import&lt;/span&gt; &lt;span class="pl-s1"&gt;rehypeSlug&lt;/span&gt; &lt;span class="pl-k"&gt;from&lt;/span&gt; &lt;span class="pl-s"&gt;'rehype-slug'&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt;
&lt;span class="pl-k"&gt;import&lt;/span&gt; &lt;span class="pl-s1"&gt;rehypeAutoLinkHeadings&lt;/span&gt; &lt;span class="pl-k"&gt;from&lt;/span&gt; &lt;span class="pl-s"&gt;'rehype-autolink-headings'&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt;
&lt;span class="pl-k"&gt;import&lt;/span&gt; &lt;span class="pl-s1"&gt;reactLiquidTag&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-kos"&gt;{&lt;/span&gt; &lt;span class="pl-v"&gt;RemarkReactLiquidTagProps&lt;/span&gt; &lt;span class="pl-kos"&gt;}&lt;/span&gt; &lt;span class="pl-k"&gt;from&lt;/span&gt; &lt;span class="pl-s"&gt;'remark-react-liquid-tag'&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt;
&lt;span class="pl-k"&gt;const&lt;/span&gt; &lt;span class="pl-v"&gt;LiquidTag&lt;/span&gt;: &lt;span class="pl-v"&gt;React&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-smi"&gt;FC&lt;/span&gt;&lt;span class="pl-c1"&gt;&amp;lt;&lt;/span&gt;&lt;span class="pl-smi"&gt;RemarkReactLiquidTagProps&lt;/span&gt;&lt;span class="pl-c1"&gt;&amp;gt;&lt;/span&gt; &lt;span class="pl-c1"&gt;=&lt;/span&gt; &lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-s1"&gt;props&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt; &lt;span class="pl-c1"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="pl-kos"&gt;{&lt;/span&gt;
  &lt;span class="pl-k"&gt;switch&lt;/span&gt; &lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-s1"&gt;props&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;type&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt; &lt;span class="pl-kos"&gt;{&lt;/span&gt;
    &lt;span class="pl-k"&gt;case&lt;/span&gt; &lt;span class="pl-s"&gt;'youtube'&lt;/span&gt;:
      &lt;span class="pl-k"&gt;return&lt;/span&gt;&lt;/pre&gt;…
&lt;/div&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/alfredosalzillo/remark-react-liquid-tag" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


</description>
      <category>react</category>
      <category>markdown</category>
      <category>typescript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>The React `useInsertionEffect` Hook</title>
      <dc:creator>Alfredo Salzillo</dc:creator>
      <pubDate>Sun, 06 Oct 2024 09:10:19 +0000</pubDate>
      <link>https://forem.com/alfredosalzillo/the-react-useinsertioneffect-hook-4f0o</link>
      <guid>https://forem.com/alfredosalzillo/the-react-useinsertioneffect-hook-4f0o</guid>
      <description>&lt;h2&gt;
  
  
  Understanding and Using React's &lt;code&gt;useInsertionEffect&lt;/code&gt; Hook
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;React's &lt;code&gt;useInsertionEffect&lt;/code&gt; hook is a specialized version of &lt;code&gt;useEffect&lt;/code&gt; that guarantees its side effects will run before any other effect in the same component. This is particularly useful for DOM operations or third-party library integrations that rely on the DOM being fully rendered before execution.&lt;/p&gt;

&lt;h3&gt;
  
  
  When to Use &lt;code&gt;useInsertionEffect&lt;/code&gt;
&lt;/h3&gt;

&lt;h4&gt;
  
  
  DOM Operations
&lt;/h4&gt;

&lt;p&gt;When you need to manipulate the DOM directly after the component is rendered, such as setting focus, scrolling to a specific element, or attaching event listeners.&lt;/p&gt;

&lt;h4&gt;
  
  
  Third-Party Libraries
&lt;/h4&gt;

&lt;p&gt;If a library requires the DOM to be ready before its functions can be called, &lt;code&gt;useInsertionEffect&lt;/code&gt; ensures it's executed at the right time.&lt;/p&gt;

&lt;h4&gt;
  
  
  Layout Effects
&lt;/h4&gt;

&lt;p&gt;For effects that depend on the layout of the component, like measuring element dimensions or calculating positions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example: Setting Focus on a Field
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useRef&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useInsertionEffect&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;MyComponent&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;inputRef&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useRef&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="nf"&gt;useInsertionEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;inputRef&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;current&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;inputRef&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;current&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;focus&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt; &lt;span class="nx"&gt;ref&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;inputRef&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;text&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, &lt;code&gt;useInsertionEffect&lt;/code&gt; is used to ensure that the &lt;code&gt;input&lt;/code&gt; element is focused as soon as it's rendered. This guarantees that the user can start typing immediately.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example: Adding Dynamic Style Rules
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useInsertionEffect&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;MyComponent&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;useInsertionEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;style&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createElement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;style&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;textContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`
      .my-custom-class {
        color: red;
        font-weight: bold;
      }
    `&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;head&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;appendChild&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;remove&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;my-custom-class&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nx"&gt;This&lt;/span&gt; &lt;span class="nx"&gt;text&lt;/span&gt; &lt;span class="nx"&gt;will&lt;/span&gt; &lt;span class="nx"&gt;have&lt;/span&gt; &lt;span class="nx"&gt;red&lt;/span&gt; &lt;span class="nx"&gt;and&lt;/span&gt; &lt;span class="nx"&gt;bold&lt;/span&gt; &lt;span class="nx"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, &lt;code&gt;useInsertionEffect&lt;/code&gt; is used to dynamically add custom style rules to the document head, ensuring that they are applied before any other effects in the component.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Points to Remember
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;useInsertionEffect&lt;/code&gt; is similar to &lt;code&gt;useEffect&lt;/code&gt; but with a specific timing guarantee.&lt;/li&gt;
&lt;li&gt;It's often used for DOM operations or third-party library integrations that require the DOM to be ready.&lt;/li&gt;
&lt;li&gt;It's important to use &lt;code&gt;useInsertionEffect&lt;/code&gt; judiciously, as excessive use can potentially impact performance.&lt;/li&gt;
&lt;li&gt;Consider using &lt;code&gt;useLayoutEffect&lt;/code&gt; if you need effects to run synchronously after the layout is complete.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;React's &lt;code&gt;useInsertionEffect&lt;/code&gt; hook is a powerful tool for ensuring that side effects are executed at the right time, particularly when dealing with DOM operations or third-party libraries. By understanding its purpose and usage, you can create more reliable and performant React components.&lt;/p&gt;

</description>
      <category>react</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Introduction to Sustainable Web Development</title>
      <dc:creator>Alfredo Salzillo</dc:creator>
      <pubDate>Mon, 09 Jan 2023 03:18:00 +0000</pubDate>
      <link>https://forem.com/alfredosalzillo/introduction-to-sustainable-web-development-27f2</link>
      <guid>https://forem.com/alfredosalzillo/introduction-to-sustainable-web-development-27f2</guid>
      <description>&lt;h2&gt;
  
  
  Sustainable Web Development
&lt;/h2&gt;

&lt;p&gt;Sustainable web development is the practice of building and maintaining websites in a way that is environmentally and socially responsible. This includes using resources efficiently, reducing waste, and minimizing negative impacts on the environment and society.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ways to Promote Sustainability in Web Development
&lt;/h2&gt;

&lt;p&gt;Use green hosting:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Choose a hosting provider that uses renewable energy sources and has a commitment to sustainability.&lt;/li&gt;
&lt;li&gt;Optimize website performance: Improve the speed and efficiency of a website to reduce energy consumption and carbon emissions.&lt;/li&gt;
&lt;li&gt;Recycle and reuse code: Save time and resources by reusing and repurposing code instead of starting from scratch for each project.&lt;/li&gt;
&lt;li&gt;Use open source software: Open source software is freely available and can be modified and distributed by anyone.&lt;/li&gt;
&lt;li&gt;Promote sustainability on client websites: Educate clients about the importance of sustainability and encourage them to adopt eco-friendly practices on their own websites.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Benefits of Sustainable Web Development
&lt;/h2&gt;

&lt;p&gt;Sustainable web development is not only good for the environment, but it can also benefit businesses and organizations by reducing costs, improving efficiency, and enhancing their reputation. By adopting sustainable practices, web developers can play a key role in building a more sustainable future for the internet.&lt;/p&gt;

&lt;h2&gt;
  
  
  Organizations and tools that focus on promoting sustainability
&lt;/h2&gt;

&lt;p&gt;There are several organizations and tools that focus on promoting sustainability in the tech industry and provide resources and guidelines for web developers and website owners looking to make their work more environmentally friendly.&lt;/p&gt;

&lt;p&gt;One such organization is the Green Web Foundation (&lt;a href="https://greenwebfoundation.org/" rel="noopener noreferrer"&gt;https://greenwebfoundation.org/&lt;/a&gt;). The Green Web Foundation is a nonprofit organization that works to identify and promote the use of green web hosting providers, as well as provide resources and tools for web developers and website owners to make their websites more energy efficient and environmentally friendly.&lt;/p&gt;

&lt;p&gt;Another organization is the Sustainable Websites Initiative (&lt;a href="https://sustainablewebsites.org/" rel="noopener noreferrer"&gt;https://sustainablewebsites.org/&lt;/a&gt;), a project of the Center for Sustainable Communication. The initiative aims to promote sustainable practices in web development and design, and provides resources and guidelines for creating eco-friendly websites. They also offer a certification program for websites that meet their sustainability standards.&lt;/p&gt;

&lt;p&gt;In addition to these organizations, the website &lt;a href="https://www.websitecarbon.com/" rel="noopener noreferrer"&gt;https://www.websitecarbon.com/&lt;/a&gt; offers a tool for measuring and reducing the carbon footprint of websites. By using this tool, web developers and website owners can calculate the carbon emissions associated with their website and take steps to reduce them.&lt;/p&gt;

</description>
      <category>watercooler</category>
    </item>
    <item>
      <title>The useTransition hook - React 17.0 beta features</title>
      <dc:creator>Alfredo Salzillo</dc:creator>
      <pubDate>Sun, 08 Jan 2023 22:50:00 +0000</pubDate>
      <link>https://forem.com/alfredosalzillo/the-usetransition-hook-react-170-beta-features-20kj</link>
      <guid>https://forem.com/alfredosalzillo/the-usetransition-hook-react-170-beta-features-20kj</guid>
      <description>&lt;h2&gt;
  
  
  Introduction to the useTransition Hook
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;useTransition&lt;/code&gt; hook is a new addition to the React family of hooks that allows developers to perform animations while waiting for an update to be committed. It is currently in beta and is subject to change, but it is a useful tool for adding polish to your React applications.&lt;/p&gt;

&lt;p&gt;To use the &lt;code&gt;useTransition&lt;/code&gt; hook, you will first need to make sure that you are using a version of React that includes it. As of the time of writing, the current version of React is &lt;code&gt;17.0.0-beta.3&lt;/code&gt;, which includes the useTransition hook.&lt;/p&gt;

&lt;p&gt;Once you have a compatible version of React, you can use the useTransition hook by importing it from the react package.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useTransition&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The useTransition hook takes two arguments: an item that you want to transition, and a configuration object that specifies the details of the transition.&lt;/p&gt;

&lt;p&gt;Here is an example of using the useTransition hook to transition the color of a div element:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function MyComponent() {
  const [color, setColor] = useState('red');
  const [startTransition, isPending] = useTransition({
    timeoutMs: 3000,
  });

  function handleClick() {
    startTransition(() =&amp;gt; {
      setColor('blue');
    });
  }

  return (
    &amp;lt;div style={{ color }}&amp;gt;
      &amp;lt;button onClick={handleClick}&amp;gt;Change Color&amp;lt;/button&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, when the button is clicked, the handleClick function is called, which triggers the startTransition function. The startTransition function takes a function as an argument, which is the update that you want to perform. In this case, the update is to change the color of the div element to blue.&lt;/p&gt;

&lt;p&gt;The useTransition hook returns a tuple with two values: a startTransition function, and a boolean value isPending that indicates whether a transition is currently in progress. You can use the isPending value to apply styles or behaviors to your component while the transition is happening.&lt;/p&gt;

&lt;p&gt;For example, you could use the isPending value to apply a spinner or loading indicator while the transition is in progress:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;MyComponent&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;color&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setColor&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;red&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;startTransition&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;isPending&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useTransition&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;timeoutMs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;handleClick&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;startTransition&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nf"&gt;setColor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;blue&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt; &lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt; &lt;span class="nx"&gt;color&lt;/span&gt; &lt;span class="p"&gt;}}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;isPending&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Loading&lt;/span&gt;&lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;      &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt; &lt;span class="nx"&gt;onClick&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;handleClick&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Change&lt;/span&gt; &lt;span class="nx"&gt;Color&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/button&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;      &lt;span class="p"&gt;)}&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The useTransition hook also supports a number of configuration options that allow you to customize the behavior of the transition. These options can be passed in the second argument to the useTransition hook.&lt;/p&gt;

&lt;p&gt;For example, you can use the timeoutMs option to specify the length of time that the transition should take. You can also use the maxDurationMs option to specify the maximum duration of the transition, in case it takes longer than expected.&lt;/p&gt;

&lt;p&gt;Here is an example of using the maxDurationMs option to ensure that the transition does not take longer than 500 milliseconds:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;startTransition&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;isPending&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useTransition&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;timeoutMs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;maxDurationMs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Another option that you can use is the suspense option, which allows you to specify a React Suspense component as the parent of your component. When the useTransition hook is in a Suspense component, it will cause the component to suspend rendering until the transition is complete. This can be useful for optimizing the performance of your application by avoiding rendering expensive components until they are needed.&lt;/p&gt;

&lt;p&gt;Here is an example of using the suspense option to wrap a component in a Suspense component:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;startTransition&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;isPending&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useTransition&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;timeoutMs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;suspense&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;MySuspenseComponent&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are many other options and features available with the useTransition hook, such as the ability to cancel or skip transitions, or to specify different styles for different stages of the transition. Be sure to check out the React documentation for more information on how to use these features.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In summary, the useTransition hook is a powerful tool for adding transitions and animations to your React components. It is easy to use and provides a lot of flexibility and customization options. If you are looking to add some polish to your React application, consider giving the useTransition hook a try.&lt;/p&gt;

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