<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mike Vardy</title>
    <description>The latest articles on DEV Community by Mike Vardy (@mike-at-redspace).</description>
    <link>https://dev.to/mike-at-redspace</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%2F1146731%2Fe8ed28e7-ffbc-4937-9cae-b8054c3f75c1.png</url>
      <title>DEV Community: Mike Vardy</title>
      <link>https://dev.to/mike-at-redspace</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mike-at-redspace"/>
    <language>en</language>
    <item>
      <title>How to Make Agents "think" Like a Maintainer</title>
      <dc:creator>Mike Vardy</dc:creator>
      <pubDate>Mon, 17 Nov 2025 11:38:25 +0000</pubDate>
      <link>https://dev.to/mike-at-redspace/make-your-agents-think-like-a-maintainer-the-setup-that-stops-bugs-early-343a</link>
      <guid>https://dev.to/mike-at-redspace/make-your-agents-think-like-a-maintainer-the-setup-that-stops-bugs-early-343a</guid>
      <description>&lt;p&gt;&lt;br&gt;
Cover Photo by &lt;a href="https://pixabay.com/users/pexels-2286921/?utm_source=link-attribution&amp;amp;utm_medium=referral&amp;amp;utm_campaign=image&amp;amp;utm_content=1841550" rel="noopener noreferrer"&gt;Pexels&lt;/a&gt; from &lt;a href="https://pixabay.com//?utm_source=link-attribution&amp;amp;utm_medium=referral&amp;amp;utm_campaign=image&amp;amp;utm_content=1841550" rel="noopener noreferrer"&gt;Pixabay&lt;/a&gt;&lt;br&gt;
  &lt;/p&gt;

&lt;p&gt;AI coding assistants are &lt;strong&gt;fast&lt;/strong&gt;. They can clear your backlog before lunch—and today's LLM tools are are way more than autocomplete.&lt;/p&gt;

&lt;p&gt;But speed alone isn’t the win—because LLMs default to the quickest path, not the right one.&lt;/p&gt;

&lt;p&gt;They don’t see your architecture. They don’t remember past outages. They don’t know you’re trying to sunset that legacy service. So they generate code that works… but quietly chips away at your standards.&lt;/p&gt;

&lt;p&gt;Role-play fixes that.&lt;/p&gt;

&lt;p&gt;When you frame the AI as a Principal Engineer, you’re giving it a persona and mindset: question shortcuts, enforce patterns, protect the long-term. Suddenly it’s not acting like a supercharged intern—it’s acting like someone who’s accountable for the health of the system.&lt;/p&gt;




&lt;h2&gt;
  
  
  Four Principles of AI Code Governance
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Role Definition
&lt;/h3&gt;

&lt;p&gt;Define your AI's responsibility explicitly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;❌ Not this:
"You are a helpful AI assistant."

✅ This:
"You are a Principal Engineer responsible for enforcing 
architectural boundaries, blocking anti-patterns, and 
maintaining code quality standards."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Try this now:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Role&lt;/span&gt;
You are the Tech Lead. Your job is to:
&lt;span class="p"&gt;-&lt;/span&gt; Enforce domain-driven design boundaries
&lt;span class="p"&gt;-&lt;/span&gt; Reject code that violates team standards
&lt;span class="p"&gt;-&lt;/span&gt; Question requests that introduce technical debt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  2. Negative Constraints
&lt;/h3&gt;

&lt;p&gt;The most powerful rules say &lt;strong&gt;"NO"&lt;/strong&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;strong&gt;Never use &lt;code&gt;any&lt;/code&gt; in TypeScript&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
⚠️ &lt;strong&gt;Core modules cannot import UI code&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
⚠️ &lt;strong&gt;No &lt;code&gt;console.log&lt;/code&gt; in production&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;These constraints prevent drift into bad habits.&lt;/p&gt;
&lt;h3&gt;
  
  
  3. Context Scoping
&lt;/h3&gt;

&lt;p&gt;Don't dump your entire rulebook into every request.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Approach&lt;/th&gt;
&lt;th&gt;Impact&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;❌ &lt;strong&gt;Bad&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;500-line &lt;code&gt;.cursorrules&lt;/code&gt; file loaded for every file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;✅ &lt;strong&gt;Good&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;Architectural rules only for &lt;code&gt;src/core/**/*.ts&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This keeps AI focused and prevents context overload.&lt;/p&gt;
&lt;h3&gt;
  
  
  4. Safety Barriers
&lt;/h3&gt;

&lt;p&gt;Make it &lt;strong&gt;impossible&lt;/strong&gt; to ship broken code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Require tests to pass&lt;/li&gt;
&lt;li&gt;✅ Run linters automatically&lt;/li&gt;
&lt;li&gt;✅ Block destructive commands&lt;/li&gt;
&lt;li&gt;✅ Enforce code review protocols&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  Tool Comparison: Choose Your Weapon
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Best For&lt;/th&gt;
&lt;th&gt;Key Feature&lt;/th&gt;
&lt;th&gt;Use When&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cursor&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Architecture enforcement&lt;/td&gt;
&lt;td&gt;File-pattern scoped rules&lt;/td&gt;
&lt;td&gt;You need surgical precision on specific file types&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Windsurf&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Continuous governance&lt;/td&gt;
&lt;td&gt;Cascade engine&lt;/td&gt;
&lt;td&gt;You want persistent rule enforcement&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Warp&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Terminal operations&lt;/td&gt;
&lt;td&gt;Folder-scoped agents&lt;/td&gt;
&lt;td&gt;You have a monorepo with different contexts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Claude Code&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Self-correction&lt;/td&gt;
&lt;td&gt;Post-execution hooks&lt;/td&gt;
&lt;td&gt;You want automated fix loops&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Gemini&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Cloud environments&lt;/td&gt;
&lt;td&gt;Layered constraints&lt;/td&gt;
&lt;td&gt;You're working in cloud-native setups&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Copilot&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Path-specific rules&lt;/td&gt;
&lt;td&gt;Directory targeting&lt;/td&gt;
&lt;td&gt;You need GitHub integration&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;


&lt;h2&gt;
  
  
  Tool-by-Tool Implementation Guide
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Cursor: Surgical Precision with MDC Rules
&lt;/h3&gt;

&lt;p&gt;
  Click to expand Cursor setup
  &lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; Enforce architecture boundaries only where they matter.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quick setup:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; .cursor/rules
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Create:&lt;/strong&gt; &lt;code&gt;.cursor/rules/architecture.mdc&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;description: DDD boundaries
globs: src/core/&lt;span class="ge"&gt;**&lt;/span&gt;/&lt;span class="err"&gt;*&lt;/span&gt;.ts
alwaysApply: false

&lt;span class="gu"&gt;## FORBIDDEN&lt;/span&gt;
&lt;span class="sb"&gt;`src/core`&lt;/span&gt; cannot import from &lt;span class="sb"&gt;`src/ui`&lt;/span&gt;

&lt;span class="gu"&gt;## REQUIRED&lt;/span&gt;
All I/O uses &lt;span class="sb"&gt;`src/core/ports`&lt;/span&gt; interfaces

&lt;span class="gu"&gt;## Protocol&lt;/span&gt;
Reject violations. Explain why.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Why this works:&lt;/strong&gt; Rules activate only for relevant files—no context pollution.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.cursor.com/context/rules" rel="noopener noreferrer"&gt;Official Cursor Rules Docs&lt;/a&gt;&lt;/p&gt;



&lt;/p&gt;


&lt;h3&gt;
  
  
  Windsurf: Continuous Governance
&lt;/h3&gt;

&lt;p&gt;
  Click to expand Windsurf setup
  &lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; Cascade rules across your entire codebase.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create:&lt;/strong&gt; &lt;code&gt;.windsurfrules&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;role&amp;gt;&lt;/span&gt;
  Maintainer. Readability over cleverness.
&lt;span class="nt"&gt;&amp;lt;/role&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;security&amp;gt;&lt;/span&gt;
  ⚠️ NEVER output secrets
  ✅ ALWAYS validate with Zod
&lt;span class="nt"&gt;&amp;lt;/security&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;  -&lt;/span&gt; Use &lt;span class="sb"&gt;`pnpm`&lt;/span&gt;
&lt;span class="p"&gt;  -&lt;/span&gt; Composition &amp;gt; inheritance
&lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;💡 &lt;strong&gt;Pro tip:&lt;/strong&gt; Add &lt;code&gt;.codeiumignore&lt;/code&gt; to hide legacy code. AI learns from what it sees—don't let it learn from old mistakes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.windsurf.com/windsurf/cascade/cascade" rel="noopener noreferrer"&gt;Windsurf Cascade Docs&lt;/a&gt;&lt;/p&gt;



&lt;/p&gt;


&lt;h3&gt;
  
  
  Warp: Folder-Scoped Terminal Agents
&lt;/h3&gt;

&lt;p&gt;
  Click to expand Warp setup
  &lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; Different AI behaviors per directory in monorepos.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Setup:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ops/WARP.md&lt;/code&gt; → DevOps persona&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;frontend/WARP.md&lt;/code&gt; → UI persona&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Safety example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# ops/WARP.md&lt;/span&gt;

⚠️ If user requests deployment commands:
DO NOT generate them.
Suggest &lt;span class="sb"&gt;`safe_deploy`&lt;/span&gt; workflow instead.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This prevents dangerous one-off CLI instructions.&lt;/p&gt;

&lt;p&gt;📖 &lt;a href="https://docs.warp.dev/features/warp-ai" rel="noopener noreferrer"&gt;Warp AI Docs&lt;/a&gt;&lt;/p&gt;



&lt;/p&gt;


&lt;h3&gt;
  
  
  Claude Code: Self-Correcting Loops
&lt;/h3&gt;

&lt;p&gt;
  Click to expand Claude Code setup
  &lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; AI sees linting errors and fixes them automatically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create:&lt;/strong&gt; &lt;code&gt;.claude/settings.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;"hooks"&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="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"postToolUse"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"eslint --fix"&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;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"postToolUse"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npm test"&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;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;p&gt;&lt;strong&gt;The magic:&lt;/strong&gt; Claude reads test output and self-corrects. No human needed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quick start:&lt;/strong&gt; Run &lt;code&gt;claude /init&lt;/code&gt; for repo-specific baseline.&lt;/p&gt;

&lt;p&gt;📖 &lt;a href="https://docs.anthropic.com/en/docs/claude-code/hooks" rel="noopener noreferrer"&gt;Claude Code Hooks Reference&lt;/a&gt;&lt;/p&gt;



&lt;/p&gt;


&lt;h3&gt;
  
  
  Gemini Code Assist: Layered Cloud Constraints
&lt;/h3&gt;

&lt;p&gt;
  Click to expand Gemini setup
  &lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; Global + local rules prevent context rot.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Structure:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;~/.gemini/GEMINI.md&lt;/code&gt; → Universal style&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;./GEMINI.md&lt;/code&gt; → Project constraints&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Security:&lt;/strong&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="nl"&gt;"coreTools"&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="s2"&gt;"ls"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"grep"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"cat"&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;p&gt;💡 &lt;strong&gt;Pro tip:&lt;/strong&gt; Limit tool access in cloud environments.&lt;/p&gt;



&lt;/p&gt;


&lt;h3&gt;
  
  
  GitHub Copilot: Path-Specific Safety
&lt;/h3&gt;

&lt;p&gt;
  Click to expand Copilot setup
  &lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; Isolate high-risk areas with targeted rules.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create:&lt;/strong&gt; &lt;code&gt;.github/instructions/migrations.instructions.md&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;applyTo: "db/migrations/&lt;span class="ge"&gt;**&lt;/span&gt;/&lt;span class="err"&gt;*&lt;/span&gt;.sql"

&lt;span class="gu"&gt;## Migration Safety&lt;/span&gt;
⚠️ Every migration needs down-migration
⚠️ NEVER &lt;span class="sb"&gt;`DROP TABLE`&lt;/span&gt; without backup
✅ Create indices CONCURRENTLY
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;📖 &lt;a href="https://docs.github.com/copilot/customizing-copilot/adding-custom-instructions-for-github-copilot" rel="noopener noreferrer"&gt;Copilot Custom Instructions&lt;/a&gt;&lt;/p&gt;



&lt;/p&gt;


&lt;h2&gt;
  
  
  The Unified Approach: One Config to Rule Them All
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt; Managing six config files is tedious.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt; Create a single &lt;strong&gt;&lt;code&gt;AGENTS.md&lt;/code&gt;&lt;/strong&gt; and symlink it everywhere.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;touch &lt;/span&gt;AGENTS.md
&lt;span class="nb"&gt;ln&lt;/span&gt; &lt;span class="nt"&gt;-sf&lt;/span&gt; AGENTS.md .cursorrules
&lt;span class="nb"&gt;ln&lt;/span&gt; &lt;span class="nt"&gt;-sf&lt;/span&gt; AGENTS.md WARP.md
&lt;span class="nb"&gt;ln&lt;/span&gt; &lt;span class="nt"&gt;-sf&lt;/span&gt; AGENTS.md CLAUDE.md
&lt;span class="nb"&gt;ln&lt;/span&gt; &lt;span class="nt"&gt;-sf&lt;/span&gt; AGENTS.md GEMINI.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;💡 &lt;strong&gt;For Cursor MDC:&lt;/strong&gt; Reference with &lt;code&gt;@AGENTS.md&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Result:&lt;/strong&gt; ✨ Every AI tool follows identical standards. One source of truth.&lt;/p&gt;


&lt;h2&gt;
  
  
  Your 3-Step Action Plan
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Step 1: Add One Negative Constraint ⏱️ 5 minutes
&lt;/h3&gt;

&lt;p&gt;Pick your biggest pain point from last code review:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Constraints&lt;/span&gt;
⚠️ NEVER use &lt;span class="sb"&gt;`console.log`&lt;/span&gt; in production code
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Step 2: Enable CI Hooks for One Directory ⏱️ 15 minutes
&lt;/h3&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;"hooks"&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;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"postToolUse"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"eslint --fix src/core"&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;h3&gt;
  
  
  Step 3: Create Unified &lt;code&gt;AGENTS.md&lt;/code&gt; ⏱️ 20 minutes
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# AI Agent Configuration&lt;/span&gt;

&lt;span class="gu"&gt;## Role&lt;/span&gt;
Principal Engineer enforcing team standards

&lt;span class="gu"&gt;## Security&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; NEVER output secrets
&lt;span class="p"&gt;-&lt;/span&gt; ALWAYS validate inputs

&lt;span class="gu"&gt;## Architecture&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Core cannot import UI
&lt;span class="p"&gt;-&lt;/span&gt; Use repository pattern

&lt;span class="gu"&gt;## Style&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Functional over class-based
&lt;span class="p"&gt;-&lt;/span&gt; TypeScript strict mode
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Symlink everywhere. Done. ✅&lt;/p&gt;


&lt;h2&gt;
  
  
  💡 The Bottom Line
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Unconfigured AI&lt;/strong&gt; = Fast but reckless&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Configured AI&lt;/strong&gt; = Fast &lt;strong&gt;and reliable&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The difference? A few well-crafted configuration files.&lt;/p&gt;
&lt;h3&gt;
  
  
  Start Today:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;✅ Add one "NEVER" rule&lt;/li&gt;
&lt;li&gt;✅ Watch errors caught earlier&lt;/li&gt;
&lt;li&gt;✅ Enjoy quieter code reviews&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Stop letting AI write bugs.&lt;/strong&gt; Give it a job description and make it role play. Make it accountable.&lt;/p&gt;


&lt;h2&gt;
  
  
  📚 Additional Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;📖 &lt;a href="https://docs.cursor.com/context/rules" rel="noopener noreferrer"&gt;Cursor Rules Documentation&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;📖 &lt;a href="https://docs.anthropic.com/en/docs/claude-code/hooks" rel="noopener noreferrer"&gt;Claude Code Hooks Reference&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;📖 &lt;a href="https://docs.github.com/copilot/customizing-copilot/adding-custom-instructions-for-github-copilot" rel="noopener noreferrer"&gt;GitHub Copilot Custom Instructions&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;📖 &lt;a href="https://docs.windsurf.com/windsurf/cascade/cascade" rel="noopener noreferrer"&gt;Windsurf Cascade Customizations&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;📖 &lt;a href="https://docs.warp.dev/features/warp-ai" rel="noopener noreferrer"&gt;Warp AI Documentation&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;

&lt;/p&gt;
&lt;div class="ltag__user ltag__user__id__1146731"&gt;
    &lt;a href="/mike-at-redspace" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__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%2F1146731%2Fe8ed28e7-ffbc-4937-9cae-b8054c3f75c1.png" alt="mike-at-redspace image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/mike-at-redspace"&gt;Mike Vardy&lt;/a&gt;Follow
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/mike-at-redspace"&gt;A senior full stack web developer with over a decade of experience creating engaging web experiences for top brands using React and Node.JS&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;





</description>
      <category>ai</category>
      <category>productivity</category>
      <category>devtool</category>
      <category>architecture</category>
    </item>
    <item>
      <title>You've probably noticed it. You're watching a video on YouTube, and the area around the video starts to softly glow, picking up the colors from the content itself.</title>
      <dc:creator>Mike Vardy</dc:creator>
      <pubDate>Sun, 09 Nov 2025 10:43:28 +0000</pubDate>
      <link>https://dev.to/mike-at-redspace/youve-probably-noticed-it-youre-watching-a-video-on-youtube-and-the-area-around-the-video-k66</link>
      <guid>https://dev.to/mike-at-redspace/youve-probably-noticed-it-youre-watching-a-video-on-youtube-and-the-area-around-the-video-k66</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/mike-at-redspace" 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%2F1146731%2Fe8ed28e7-ffbc-4937-9cae-b8054c3f75c1.png" alt="mike-at-redspace"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/mike-at-redspace/dynamic-theming-a-developers-guide-to-adaptive-color-in-ui-53ml" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Dynamic Theming: A Developer’s Guide to Adaptive Color in UI&lt;/h2&gt;
      &lt;h3&gt;Mike Vardy ・ Nov 9&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#frontend&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#designsystem&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#uxdesign&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#ux&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>frontend</category>
      <category>designsystem</category>
      <category>uxdesign</category>
      <category>ux</category>
    </item>
    <item>
      <title>Dynamic Theming: A Developer’s Guide to Adaptive Color in UI</title>
      <dc:creator>Mike Vardy</dc:creator>
      <pubDate>Sun, 09 Nov 2025 09:04:29 +0000</pubDate>
      <link>https://dev.to/mike-at-redspace/dynamic-theming-a-developers-guide-to-adaptive-color-in-ui-53ml</link>
      <guid>https://dev.to/mike-at-redspace/dynamic-theming-a-developers-guide-to-adaptive-color-in-ui-53ml</guid>
      <description>&lt;p&gt;Cover Photo by &lt;a href="https://unsplash.com/@peter-olexa-2214257?utm_content=creditCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=unsplash" rel="noopener noreferrer"&gt;Peter Olexa&lt;/a&gt; on &lt;a href="https://www.pexels.com/photo/palette-of-colors-14299950/?utm_content=creditCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=unsplash" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;br&gt;
  &lt;/p&gt;

&lt;p&gt;You've probably noticed it. You're watching a video on YouTube in dark mode, and the area &lt;em&gt;around&lt;/em&gt; the video starts to softly glow, picking up the colors from the content itself. That, my friends, is "Ambient Mode."&lt;/p&gt;

&lt;p&gt;It's a subtle but powerful UI technique that makes the experience feel more immersive and integrated. It looks like a complex, big-budget feature, but what if I told you it's an effect you can add to your &lt;em&gt;own&lt;/em&gt; projects?&lt;/p&gt;

&lt;p&gt;This isn't just a gimmick. It's a powerful way to create a more cohesive user experience. But how do they do it? And how can &lt;em&gt;we&lt;/em&gt; do it without a massive engineering team?&lt;/p&gt;

&lt;p&gt;Let's dig in.&lt;/p&gt;

&lt;h2&gt;
  
  
  The YouTube Approach: An "Ambient Glow"
&lt;/h2&gt;

&lt;p&gt;When YouTube rolled out its redesign in October 2022, Ambient Mode was the star. According to &lt;a href="https://blog.youtube/inside-youtube/youtube-ambient-color-mode-visual-language-redesign/" rel="noopener noreferrer"&gt;their design team&lt;/a&gt;, they use "dynamic color sampling" to tint the UI.&lt;/p&gt;

&lt;p&gt;Here's the breakdown:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Source:&lt;/strong&gt; It pulls colors from the video's thumbnail and storyboard frames (the little previews you see when scrubbing).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Technique:&lt;/strong&gt; Instead of just picking &lt;em&gt;one&lt;/em&gt; dominant color, they take the raw frame, blur it, stretch it, and overlay it as a subtle background glow. This ensures the glow "is inclusive of all colors used in a single thumbnail."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Performance Fallback:&lt;/strong&gt; On low-powered devices, this blurring and sampling can be expensive. So, YouTube computes a simpler, neutral tint based on the "Kelvin color temperature" of the scene. In other words, it maps the video's aggregate warm or cool tone to a uniform background color.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;In the DOM (The UI Tint):&lt;/strong&gt; It's actually a two-part effect. The "ambient glow" is the blurred background, but YouTube &lt;em&gt;also&lt;/em&gt; samples a more saturated, dominant color to tint the UI controls. This is where variables like &lt;code&gt;--yt-saturated-raised-background&lt;/code&gt; come in. You'll see this specific color applied to the hover effect on video thumbnails, the background of the description box, and highlights on the playlist. It's a subtle way to make the entire interface feel responsive to the content.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Competition: Spotify vs. Netflix
&lt;/h2&gt;

&lt;p&gt;YouTube's approach is cool, but it's not the only way. Let's look at two other streaming giants.&lt;/p&gt;

&lt;h3&gt;
  
  
  Netflix: All About the &lt;em&gt;Imagery&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;You might be surprised to learn that Netflix's UI color scheme is almost completely static. Their brand identity is built on "Netflix Red" (&lt;code&gt;#E50914&lt;/code&gt;) and a strict &lt;a href="https://mobbin.com/colors/brand/netflix" rel="noopener noreferrer"&gt;red-and-black palette&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Instead of changing the UI &lt;em&gt;color&lt;/em&gt;, Netflix invests heavily in changing the UI &lt;em&gt;imagery&lt;/em&gt;. They use sophisticated ML models (like "Aesthetic Visual Analysis") to &lt;a href="https://blogs.cornell.edu/info2040/2022/09/28/how-netflix-uses-matching-to-pick-the-best-thumbnail-for-you/" rel="noopener noreferrer"&gt;pick the perfect thumbnail&lt;/a&gt; just for you. The app's chrome (buttons, backgrounds) stays the same, but the content art is hyper-personalized.&lt;/p&gt;

&lt;h3&gt;
  
  
  Spotify: All About the &lt;em&gt;Album Art&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;Spotify is the classic example of dynamic theming. As &lt;a href="https://developer.spotify.com/documentation/design" rel="noopener noreferrer"&gt;their own developer guidelines&lt;/a&gt; recommend, the UI should "Extract artwork color for background."&lt;/p&gt;

&lt;p&gt;When you're on the "Now Playing" screen, the app samples the current track's cover art and derives a color scheme. This dominant color is used to style the background, creating a seamless transition as you move from one song (and one album cover) to the next.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Get the Effect: From DIY to Drop-in
&lt;/h2&gt;

&lt;p&gt;Okay, theory's great. But how do we &lt;em&gt;build&lt;/em&gt; this? You have a few options, ranging from fully manual to a simple, drop-in solution.&lt;/p&gt;

&lt;h3&gt;
  
  
  Option 1: The DIY Route (The Hard Way)
&lt;/h3&gt;

&lt;p&gt;You can roll your own extraction using the HTML5 &lt;code&gt;&amp;lt;canvas&amp;gt;&lt;/code&gt; API. The idea is to draw the image (or a video frame) to a hidden canvas and then read its pixel data to find the dominant color.&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="c1"&gt;// img is your loaded image element&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;canvas&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;canvas&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// For performance, scale the image down. 100x100 is often enough.&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;W&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;100&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;H&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;100&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;ctx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getContext&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;2d&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;drawImage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;img&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;W&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;H&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// This is the magic part!&lt;/span&gt;
&lt;span class="c1"&gt;// .data is a giant array: [R1, G1, B1, A1, R2, G2, B2, A2, ...]&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getImageData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;W&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;H&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Now you can loop through `data` (in steps of 4)&lt;/span&gt;
&lt;span class="c1"&gt;// to compute an average color, find the most common color (histogram),&lt;/span&gt;
&lt;span class="c1"&gt;// or whatever logic you want!&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Pro-tips for this method:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;CORS:&lt;/strong&gt; If your image is from another domain, you'll hit a security error. You need to enable CORS on the image: &lt;code&gt;img.crossOrigin = 'anonymous'&lt;/code&gt; (and the server must send the right headers!).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Performance:&lt;/strong&gt; Reading pixel data &lt;em&gt;is a main-thread-blocking operation&lt;/em&gt;. For video, you'd have to do this on an &lt;code&gt;OffscreenCanvas&lt;/code&gt; in a Web Worker to avoid making your UI stutter. This gets complicated, fast.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
  
  
  Option 2: General Color-Sampling Libraries
&lt;/h3&gt;

&lt;p&gt;If you're working with static images (like Spotify's album art), the DIY route is overkill. Libraries are a much better choice.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.google.com/search?q=https://lokeshdhakar.com/projects/color-chief/" rel="noopener noreferrer"&gt;&lt;strong&gt;Color Thief&lt;/strong&gt;&lt;/a&gt;: A simple, popular choice. It can give you a single dominant color or a whole palette from an image.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://jariz.github.io/vibrant.js/" rel="noopener noreferrer"&gt;&lt;strong&gt;Vibrant.js&lt;/strong&gt;&lt;/a&gt;: A port of Android's powerful Palette API. It gives you a rich set of color swatches like "Vibrant," "Muted," and "DarkVibrant."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://culorijs.org/" rel="noopener noreferrer"&gt;&lt;strong&gt;Culori&lt;/strong&gt;&lt;/a&gt;: A modern color library for JavaScript that makes it easy to parse, convert, blend, and manipulate colors. Useful if you want to generate dynamic themes, adjust lightness/luma, or mix multiple extracted colors for UI effects.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://codepen.io/alexandrevacassin" rel="noopener noreferrer"&gt;Alexandre Vacassin&lt;/a&gt; on CodePen has a great example on generating an entire palette from a single color using &lt;a href="https://coloris.js.org/" rel="noopener noreferrer"&gt;Coloris&lt;/a&gt;&lt;br&gt;


&lt;iframe height="600" src="https://codepen.io/alexandrevacassin/embed/pvjGNYJ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;


&lt;/p&gt;

&lt;p&gt;These are fantastic for a single dominant color. But for &lt;em&gt;video&lt;/em&gt;, they still require you to manually grab frames, pipe them to a canvas, and then run the extraction, all while managing performance.&lt;/p&gt;
&lt;h3&gt;
  
  
  Option 3: Instant YouTube-Style Glow
&lt;/h3&gt;

&lt;p&gt;If all you want is the soft, color-reactive glow around videos — like YouTube’s Ambient Mode — you don’t need to reinvent the wheel.&lt;/p&gt;

&lt;p&gt;That’s where a focused, open-source library comes in. &lt;a href="https://github.com/mike-at-redspace/video-ambient-glow/" rel="noopener noreferrer"&gt;&lt;strong&gt;&lt;code&gt;video-ambient-glow&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt; handles this end-to-end: it captures video frames and applies a subtle, blurred glow to the area around the video automatically — no color extraction or manual calculations required.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcl7naoblzt6guo2bptuo.jpg" 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%2Fcl7naoblzt6guo2bptuo.jpg" alt="Screenshot showing the example app from the video-ambient-glow package on npm"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Check out the &lt;a href="https://video-ambient-glow.netlify.app/" rel="noopener noreferrer"&gt;live demo&lt;/a&gt;. Forget the canvas headaches — just drop in the library and get the glow instantly.&lt;/p&gt;
&lt;h3&gt;
  
  
  A Note on Accessibility
&lt;/h3&gt;

&lt;p&gt;No matter which method you choose, this is the most important step. &lt;strong&gt;Dynamic color must not come at the cost of readability.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A random color from an image has no guarantee of providing good contrast with your text.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Check Contrast:&lt;/strong&gt; Always check your generated color against its text color. Aim for a &lt;a href="https://web.dev/color-contrast/" rel="noopener noreferrer"&gt;WCAG 4.5:1 contrast ratio&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Check Luma:&lt;/strong&gt; You can programmatically check if a color is "dark" or "light" (by calculating its luma) and conditionally switch your text color between &lt;code&gt;black&lt;/code&gt; and &lt;code&gt;white&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Be Subtle:&lt;/strong&gt; A safer approach, like YouTube's, is to use the dynamic color for &lt;em&gt;decorative&lt;/em&gt; elements only (like backgrounds and glows) while keeping your main text and interactive elements on fixed, high-contrast colors.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Dynamic theming is a fantastic way to break out of the static-brand box and create UIs that feel more alive and integrated with the content. It used to be a feature reserved for tech giants, but with powerful techniques and great open-source tools like &lt;a href="https://www.npmjs.com/package/video-ambient-glow" rel="noopener noreferrer"&gt;&lt;strong&gt;&lt;code&gt;video-ambient-glow&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt; available, it's never been easier to add this premium touch to your own video projects.&lt;/p&gt;

&lt;p&gt;Happy theming!&lt;/p&gt;

&lt;p&gt;

&lt;/p&gt;
&lt;div class="ltag__user ltag__user__id__1146731"&gt;
    &lt;a href="/mike-at-redspace" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__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%2F1146731%2Fe8ed28e7-ffbc-4937-9cae-b8054c3f75c1.png" alt="mike-at-redspace image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/mike-at-redspace"&gt;Mike Vardy&lt;/a&gt;Follow
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/mike-at-redspace"&gt;A senior full stack web developer with over a decade of experience creating engaging web experiences for top brands using React and Node.JS&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;





</description>
      <category>frontend</category>
      <category>designsystem</category>
      <category>uxdesign</category>
      <category>ux</category>
    </item>
    <item>
      <title>Transforming Chaos: Unleashing the Power of Ramda in ReactJS</title>
      <dc:creator>Mike Vardy</dc:creator>
      <pubDate>Mon, 11 Mar 2024 10:45:57 +0000</pubDate>
      <link>https://dev.to/mike-at-redspace/transforming-chaos-unleashing-the-power-of-ramda-in-reactjs-34fa</link>
      <guid>https://dev.to/mike-at-redspace/transforming-chaos-unleashing-the-power-of-ramda-in-reactjs-34fa</guid>
      <description>&lt;p&gt;Cover Photo by &lt;a href="https://unsplash.com/@nattgw?utm_content=creditCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=unsplash" rel="noopener noreferrer"&gt;Nat&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/red-and-blue-textile-on-blue-textile-9l98kFByiao?utm_content=creditCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=unsplash" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;br&gt;
  &lt;/p&gt;

&lt;p&gt;Maintaining large imperative React projects can be a daunting task, fraught with complex state management, side effects, and tight coupling. The importance of clean and maintainable code for scalability cannot be overstated. This is where Ramda, a functional programming library, comes into play.&lt;/p&gt;

&lt;p&gt;Ramda offers a streamlined approach to coding, enhancing readability and promoting a more functional style of programming. This blog post will guide you through the journey of integrating Ramda into your React projects, showcasing its potential to transform imperative chaos into pure order.&lt;/p&gt;




&lt;h2&gt;
  
  
  An Introduction to Ramda
&lt;/h2&gt;

&lt;p&gt;Ramda is a practical functional library designed specifically for JavaScript, emphasizing a purer functional style with immutability and side-effect free functions at the forefront. It offers features like automatic currying, function composition, and higher-order functions, making functional programming in JavaScript more accessible and enjoyable. &lt;/p&gt;

&lt;p&gt;Ramda can be seamlessly integrated into a React project, enhancing the development experience with its utility functions and functional programming concepts.&lt;/p&gt;




&lt;h2&gt;
  
  
  Cleaning Up State Management
&lt;/h2&gt;

&lt;p&gt;Ramda simplifies state management by promoting immutability and providing utility functions for working with data. It allows for complex state transformations and updates in a more declarative manner, reducing the need for imperative code and making state management more predictable and easier to reason about.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbx6z8c3t66vf48ufbawj.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%2Fbx6z8c3t66vf48ufbawj.png" alt="code example of state with ramda" width="800" height="905"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Taming Side Effects
&lt;/h2&gt;

&lt;p&gt;Consider a React component that fetches a list of users, filters out inactive users, and then maps over the active users to display their names in a list. Without Ramda, the code might look something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe0d4wafh5ix9m44md517.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%2Fe0d4wafh5ix9m44md517.png" alt="original code" width="800" height="985"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, let's refactor this example using Ramda. We'll use R.filter to filter the users, &lt;code&gt;R.map&lt;/code&gt; to transform the user objects into names, and &lt;code&gt;R.pipe&lt;/code&gt; to combine these operations elegantly. This approach not only makes the code more readable but also emphasizes the data transformations in a declarative manner.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fli9anc5icc8fnr9w4p43.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%2Fli9anc5icc8fnr9w4p43.png" alt="refactored code" width="800" height="1050"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The use of &lt;code&gt;R.pipe&lt;/code&gt; clearly defines the data transformation steps in a readable and maintainable manner. It's easy to see at a glance that we're filtering active users and then mapping to their names. your brain now wants to refactor it further&lt;/p&gt;

&lt;p&gt;Ramda's functions are automatically curried, making them highly reusable. The same transformation logic &lt;code&gt;processUsers&lt;/code&gt; could be easily applied elsewhere without modification.&lt;/p&gt;

&lt;p&gt;Ramda encourages a functional programming style that avoids side effects and operates on data immutably. This can lead to fewer bugs and more predictable code.&lt;/p&gt;




&lt;h2&gt;
  
  
  Simplifying Components with Ramda
&lt;/h2&gt;

&lt;p&gt;Ramda's utility functions can then be used to write more functional and declarative code. For example, to find a user with a specific ID in an array of users:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw2gbuc3wf9zaqupte4j6.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%2Fw2gbuc3wf9zaqupte4j6.png" alt="Simplifying code sample with ramda" width="800" height="673"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  More Advanced Examples of Ramda
&lt;/h2&gt;

&lt;p&gt;Imagine a scenario where you have a component that fetches data from an API and then processes this data to display it in a user-friendly format.&lt;br&gt;
Without Ramda, you might handle this with a series of imperative statements and conditional logic. However, with Ramda, you can use a combination of &lt;code&gt;pipe&lt;/code&gt;, &lt;code&gt;map&lt;/code&gt;, and &lt;code&gt;filter&lt;/code&gt; to create a more functional and declarative solution.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsi3kosa6l92nit1i1fsl.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%2Fsi3kosa6l92nit1i1fsl.png" alt="complex example of react with ramda" width="800" height="1211"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this example, the &lt;code&gt;processData&lt;/code&gt; function uses Ramda's &lt;code&gt;pipe&lt;/code&gt; to create a pipeline that first filters out users under the age of 25 and then maps over the remaining users to pick only the name and age properties. This approach is more declarative and easier to understand than a series of if statements and for loops.&lt;/p&gt;

&lt;p&gt;This example showcases how Ramda can be used to enhance the logic of React components, making them more functional, declarative, and easier to maintain. By leveraging Ramda's functional programming capabilities, developers can write cleaner, more readable code that is also more scalable and easier to test.&lt;/p&gt;



&lt;p&gt;Incorporating Ramda into React projects offers numerous benefits, including improved code readability, maintainability, and scalability. By adopting functional programming principles, developers can transform their projects from chaos to order, enhancing the overall development experience. &lt;/p&gt;

&lt;p&gt;Happy Coding!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you are interested in a deeper dive I recommend the talk&lt;br&gt;
Hey Underscore, You're Doing It Wrong by Brian Lonsdorf&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/m3svKOdZijA"&gt;
&lt;/iframe&gt;
&lt;/p&gt;


&lt;div class="ltag__user ltag__user__id__1146731"&gt;
    &lt;a href="/mike-at-redspace" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__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%2F1146731%2Fe8ed28e7-ffbc-4937-9cae-b8054c3f75c1.png" alt="mike-at-redspace image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/mike-at-redspace"&gt;Mike Vardy&lt;/a&gt;Follow
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/mike-at-redspace"&gt;A senior full stack web developer with over a decade of experience creating engaging web experiences for top brands using React and Node.JS&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>javascript</category>
      <category>functional</category>
      <category>tutorial</category>
      <category>react</category>
    </item>
    <item>
      <title>How to Add a Large List of Elements to the DOM Efficiently Using DocumentFragments 🧩</title>
      <dc:creator>Mike Vardy</dc:creator>
      <pubDate>Mon, 23 Oct 2023 09:11:32 +0000</pubDate>
      <link>https://dev.to/mike-at-redspace/how-to-add-a-large-list-of-elements-to-the-dom-efficiently-using-documentfragments-37pp</link>
      <guid>https://dev.to/mike-at-redspace/how-to-add-a-large-list-of-elements-to-the-dom-efficiently-using-documentfragments-37pp</guid>
      <description>&lt;p&gt;Cover Photo by &lt;a href="https://unsplash.com/@sunder_2k25?utm_content=creditCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=unsplash" rel="noopener noreferrer"&gt;Sunder Muthukumaran&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/a-wooden-stand-with-three-metal-balls-on-it-d7SxBxEAOfU?utm_content=creditCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=unsplash" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;br&gt;
  &lt;/p&gt;

&lt;p&gt;You may have encountered situations where you need to add a large list of elements to a web page dynamically. For example, you may want to display a list of products, comments, search results, or other data that is fetched from an API or a database.&lt;/p&gt;

&lt;p&gt;However, adding a large list of elements to the web page can be challenging in terms of performance and user experience. If you directly manipulate the DOM for each element, you may cause unnecessary reflows and repaints, which can slow down the page rendering and make the user interface unresponsive.&lt;/p&gt;

&lt;p&gt;Fortunately, there is a better way to handle this problem: using &lt;code&gt;DocumentFragments&lt;/code&gt;. &lt;code&gt;DocumentFragments&lt;/code&gt; are a special type of node that can hold other nodes without affecting the live DOM. They allow you to create and manipulate a large list of elements in memory, and then append them to the web page in one go. This can significantly improve the performance and user experience of your web application.&lt;/p&gt;

&lt;p&gt;In this post, I will explain what &lt;code&gt;DocumentFragments&lt;/code&gt; are, how they differ from traditional DOM manipulation, and how to use them to add a large list of elements efficiently. I will also show you some best practices, real-world use cases, performance comparisons, and browser compatibility issues related to &lt;code&gt;DocumentFragments&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Let's get started!&lt;/p&gt;




&lt;h2&gt;
  
  
  The &lt;code&gt;DocumentFragments&lt;/code&gt; API
&lt;/h2&gt;

&lt;p&gt;A &lt;code&gt;DocumentFragment&lt;/code&gt; is a node that can contain other nodes, but is not part of the live DOM tree. It acts as a lightweight document that can store a fragment of HTML or XML content.&lt;/p&gt;

&lt;p&gt;You can create a DocumentFragment using the &lt;code&gt;document.createDocumentFragment()&lt;/code&gt; method. This returns an empty &lt;code&gt;DocumentFragment&lt;/code&gt; object that you can populate with other nodes.&lt;/p&gt;

&lt;p&gt;Unlike regular nodes, &lt;code&gt;DocumentFragments&lt;/code&gt; do not have any parent or sibling nodes. They are isolated from the live DOM and do not trigger any reflows or repaints when you modify them. This means that you can add, remove, or change the nodes inside a DocumentFragment without affecting the web page layout or performance.&lt;/p&gt;

&lt;p&gt;When you are ready to insert the nodes from a DocumentFragment into the live DOM, you can use the &lt;code&gt;appendChild()&lt;/code&gt; or &lt;code&gt;insertBefore()&lt;/code&gt; methods on any node that accepts child nodes. This will move all the nodes from the DocumentFragment to the specified location in the live DOM, and empty the DocumentFragment object.&lt;/p&gt;

&lt;p&gt;The advantage of using &lt;code&gt;DocumentFragments&lt;/code&gt; is that they allow you to perform batch operations on a large number of nodes in memory, and then append them to the web page in one go. This reduces the number of DOM manipulations and improves the performance and user experience of your web application.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem with Traditional DOM Manipulation
&lt;/h2&gt;

&lt;p&gt;To understand why &lt;code&gt;DocumentFragments&lt;/code&gt; are useful, let's first look at what happens when you use traditional DOM manipulation to add a large list of elements to a web page.&lt;/p&gt;

&lt;p&gt;Suppose you have an empty &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt; element in your HTML document, and you want to add 1000 &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; elements to it dynamically using JavaScript. One way to do this is to use a loop and create each &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; element using the &lt;code&gt;document.createElement()&lt;/code&gt; method. Then, for each &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; element, you can set its text content using the &lt;code&gt;textContent&lt;/code&gt; property, and append it to the &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt; element using the &lt;code&gt;appendChild()&lt;/code&gt; method.&lt;/p&gt;

&lt;p&gt;Here is an example of how this code might look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Get the &amp;lt;ul&amp;gt; element
const ul = document.getElementById("list");

// Simulate adding 1000 list items
for (let i = 0; i &amp;lt; 1000; i++) {
  // Create an &amp;lt;li&amp;gt; element
  const li = document.createElement("li");
  // Set its text content
  li.textContent = "Item " + (i + 1);
  // Append it to the &amp;lt;ul&amp;gt; element
  ul.appendChild(li);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This code seems simple and straightforward, but it has some serious drawbacks in terms of performance and user experience.&lt;/p&gt;

&lt;p&gt;First of all, every time you append an &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; element to the &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt; element, you are modifying the live DOM tree. This means that the browser has to recalculate the layout and style of the web page, and repaint the affected regions on the screen. These operations are expensive and time-consuming, especially when you have a large number of complex elements.&lt;/p&gt;

&lt;p&gt;Secondly, every time you modify the live DOM tree, you are blocking the main thread of JavaScript execution. This means that while the loop is running, no other JavaScript code can run, and no user interactions can be processed. This can make the web page unresponsive and freeze the user interface until all the elements are added.&lt;/p&gt;

&lt;p&gt;As a result, using traditional DOM manipulation for adding a large list of elements can cause poor performance and user experience issues such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Slow page rendering&lt;/li&gt;
&lt;li&gt;Janky animations&lt;/li&gt;
&lt;li&gt;Delayed user feedback&lt;/li&gt;
&lt;li&gt;High CPU and memory usage&lt;/li&gt;
&lt;li&gt;Battery drain&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  Creating and Using &lt;code&gt;DocumentFragments&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;To avoid the problems of traditional DOM manipulation, you can use &lt;code&gt;DocumentFragments&lt;/code&gt; to add a large list of elements efficiently.&lt;/p&gt;

&lt;p&gt;The idea is to create a &lt;code&gt;DocumentFragment&lt;/code&gt; object, and populate it with the &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; elements in memory. Then, you can append the DocumentFragment object to the &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt; element in one go. This way, you only modify the live DOM once, and avoid unnecessary reflows and repaints.&lt;/p&gt;

&lt;p&gt;Here is an example of how to use &lt;code&gt;DocumentFragments&lt;/code&gt; to add 1000 &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; elements to a web page:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Create a DocumentFragment
const fragment = document.createDocumentFragment();

// Simulate adding 1000 list items to the DocumentFragment
for (let i = 1; i &amp;lt;= 1000; i++) {
  const li = document.createElement("li");
  li.textContent = `List Item ${i}`;
  fragment.appendChild(li);
}

// Now, append the entire DocumentFragment to the live DOM
const myList = document.getElementById("myList");
myList.appendChild(fragment);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;With &lt;code&gt;DocumentFragments&lt;/code&gt;, you perform a single DOM modification operation rather than 1000 individual ones. This optimization significantly reduces the overhead associated with layout calculations and repaints, resulting in a faster and smoother user experience.&lt;/p&gt;

&lt;p&gt;Unlike the first example, using &lt;code&gt;DocumentFragments&lt;/code&gt; doesn't block the main JavaScript thread. It means your web page remains responsive and doesn't freeze during the process, ensuring a better user experience.&lt;/p&gt;

&lt;p&gt;By minimizing layout recalculations and repaints, your web application consumes fewer resources. This leads to lower CPU and memory usage, extending the life of mobile device batteries and providing a more energy-efficient experience.&lt;/p&gt;



&lt;p&gt;In conclusion, DocumentFragments are a powerful tool in a web developer's toolkit. They enable you to efficiently add large lists of elements to a web page, improving performance and user experience. By batching DOM modifications and reducing rendering bottlenecks, you can create web applications that are both faster and more responsive.&lt;/p&gt;

&lt;p&gt;So, the next time you're faced with adding a significant number of elements dynamically, remember DocumentFragments. They're the secret to a more efficient and user-friendly web.&lt;/p&gt;

&lt;p&gt;Happy coding! 🚀✨&lt;/p&gt;


&lt;div class="ltag__user ltag__user__id__1146731"&gt;
    &lt;a href="/mike-at-redspace" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__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%2F1146731%2Fe8ed28e7-ffbc-4937-9cae-b8054c3f75c1.png" alt="mike-at-redspace image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/mike-at-redspace"&gt;Mike Vardy&lt;/a&gt;Follow
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/mike-at-redspace"&gt;A senior full stack web developer with over a decade of experience creating engaging web experiences for top brands using React and Node.JS&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;



</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>html</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Enhance Your React Components ✨ /w a Glossy Shine Effect</title>
      <dc:creator>Mike Vardy</dc:creator>
      <pubDate>Fri, 08 Sep 2023 08:29:39 +0000</pubDate>
      <link>https://dev.to/mike-at-redspace/enhance-your-react-components-w-a-glossy-shine-effect-5ejo</link>
      <guid>https://dev.to/mike-at-redspace/enhance-your-react-components-w-a-glossy-shine-effect-5ejo</guid>
      <description>&lt;p&gt;Cover Photo by &lt;a href="https://unsplash.com/@snapsbyclark?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Clark Van Der Beken&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/Tk0B3Dfkf_4?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;br&gt;
  &lt;/p&gt;

&lt;p&gt;Have you ever come across something on those stunning websites where elements seem to shimmer and shine as you hover over them? Well, you're in luck because in this quick tutorial, I am going to show you how to create a cool gloss effect using a custom React hook called &lt;code&gt;useGlossEffect&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;But first, let's give credit where it's due. We were inspired to create this React version of the awesome gloss effect created by Tahazsh on CodePen. You can check out the original pen right here: &lt;a href="https://codepen.io/tahazsh/pen/wvQwqYv" rel="noopener noreferrer"&gt;Tahazsh's CodePen&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Let's start with a demo:&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/mike-at-redspace/embed/NWEaOJe?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;




&lt;h2&gt;
  
  
  Styling the Gloss Effect
&lt;/h2&gt;

&lt;p&gt;We'll start by defining the appearance of our gloss using CSS. We'll create a class called &lt;code&gt;.gloss&lt;/code&gt; that specifies the gloss's opacity, size, position, and that beautiful radial gradient background.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9i77kuqwxg76e3knmqly.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%2F9i77kuqwxg76e3knmqly.png" alt="css code" width="800" height="706"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Crafting the &lt;code&gt;useGlossEffect&lt;/code&gt; Hook
&lt;/h2&gt;

&lt;p&gt;The heart of our gloss effect is the &lt;code&gt;useGlossEffect&lt;/code&gt; hook. This hook takes three references as arguments: &lt;code&gt;cardRef&lt;/code&gt;, &lt;code&gt;cardContentRef&lt;/code&gt;, and &lt;code&gt;glossRef&lt;/code&gt;. These references point to the card element, card content, and gloss element, respectively.&lt;/p&gt;

&lt;p&gt;Inside the hook, we have three key functions:&lt;/p&gt;

&lt;h3&gt;
  
  
  🌟 &lt;code&gt;addShineClass()&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;This function adds the gloss--shine class to our gloss element. This class triggers the transition and makes the gloss shine when we hover over it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsofas9xml4nzjobo68mk.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%2Fsofas9xml4nzjobo68mk.png" alt="addShineClass code" width="800" height="317"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  🗺️ &lt;code&gt;mapNumberRange()&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;At the heart of the &lt;code&gt;mapNumberRange&lt;/code&gt; function lies a fundamental mathematical concept known as linear interpolation. Linear interpolation is a technique used to estimate values within a given range based on known values at two endpoints. In our case, we leverage this technique to map a value from one range to another.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9lhzg5hiur5j1mqel7xr.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%2F9lhzg5hiur5j1mqel7xr.png" alt="mapNumberRange code" width="800" height="268"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  🧮 &lt;code&gt;calculateTransformValues()&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;In this function, we calculate various values needed for the gloss effect, including rotation degree, translation, and opacity. We use the mouse pointer's position and the card's dimensions to determine how the gloss should behave. Kudos to Tahazsh's for the math here.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5xfw76u4rqo3ty8kwfnw.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%2F5xfw76u4rqo3ty8kwfnw.png" alt="calculateTransformValues code" width="800" height="536"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  ✨ &lt;code&gt;applyTransform()&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Here, we apply the calculated transforms and opacity to our card content and gloss elements, creating that mesmerizing effect. It uses the values calculated in the previous step.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flky7irpj3kx7749anpvx.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%2Flky7irpj3kx7749anpvx.png" alt="applyTransform code" width="800" height="438"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Bringing It All Together
&lt;/h2&gt;

&lt;p&gt;To complete our gloss effect, we wrap it up within a &lt;code&gt;useEffect&lt;/code&gt; block. This effect initializes the gloss effect when the component mounts and removes event listeners when the component unmounts.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl7s8rrb73x083ve8rajk.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%2Fl7s8rrb73x083ve8rajk.png" alt="useEffect code" width="800" height="511"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;

&lt;p&gt;To use this captivating gloss effect, simply import the &lt;code&gt;useGlossEffect&lt;/code&gt; hook into your React component and call it, passing the appropriate refs. Here's how you can use it:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1g25v9zn2u2ag9wfxt95.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%2F1g25v9zn2u2ag9wfxt95.png" alt="usage" width="800" height="584"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;And there you have it! You've successfully added a mesmerizing gloss effect to your React components, taking inspiration from the awesome work of Tahazsh on CodePen. Now, it's time to see your cards come to life with a captivating shine and sparkle as you hover over them.&lt;/p&gt;

&lt;p&gt;Feel free to fork the CodePen demo and give &lt;a href="https://codepen.io/tahazsh" rel="noopener noreferrer"&gt;Tahazsh&lt;/a&gt; a follow to explore even more inspiring UX.&lt;/p&gt;

&lt;p&gt;Happy coding! 🚀✨&lt;/p&gt;


&lt;div class="ltag__user ltag__user__id__1146731"&gt;
    &lt;a href="/mike-at-redspace" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__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%2F1146731%2Fe8ed28e7-ffbc-4937-9cae-b8054c3f75c1.png" alt="mike-at-redspace image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/mike-at-redspace"&gt;Mike Vardy&lt;/a&gt;Follow
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/mike-at-redspace"&gt;A senior full stack web developer with over a decade of experience creating engaging web experiences for top brands using React and Node.JS&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>react</category>
      <category>codepen</category>
      <category>css</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Creating a Simple Custom JSX Parser /w Practical Example</title>
      <dc:creator>Mike Vardy</dc:creator>
      <pubDate>Wed, 30 Aug 2023 08:05:46 +0000</pubDate>
      <link>https://dev.to/mike-at-redspace/creating-a-simple-custom-jsx-parser-w-practical-example-1p8h</link>
      <guid>https://dev.to/mike-at-redspace/creating-a-simple-custom-jsx-parser-w-practical-example-1p8h</guid>
      <description>&lt;p&gt;Cover Photo by &lt;a href="https://unsplash.com/@flowforfrank?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Ferenc Almasi&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/c8h0n7fSTqs?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;br&gt;
  &lt;/p&gt;

&lt;p&gt;In the rapidly evolving landscape of modern web development, the fusion of JavaScript and HTML has given rise to a game-changer: JSX. This ingenious bridge has redefined how user interfaces are created, powering frameworks like React, Vue, and Solid.&lt;/p&gt;

&lt;p&gt;But have you ever wondered about the magic behind it? Creating your own JSX parser might sound complex, yet it's surprisingly approachable. In this post, we'll dive into the elegance beneath JSX's surface.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Missing Link: The Essence of JSX
&lt;/h2&gt;

&lt;p&gt;JavaScript and HTML are distinct languages, and JSX serves as the bridge that connects them. It's like a translator allowing HTML-like code to coexist within JavaScript files. This enables frameworks, like React and others, to build captivating, interactive user interfaces.&lt;/p&gt;

&lt;p&gt;However, a crucial step is missing. Browsers understand HTML, not JSX. Writing JSX is crafting a higher-level abstraction that developers intuitively grasp. But for this virtual world to transform into real web pages, the translation to tangible HTML is vital.&lt;/p&gt;

&lt;p&gt;This is where a custom JSX parser steps in, translating JSX into HTML that browsers comprehend.&lt;/p&gt;




&lt;h2&gt;
  
  
  Unraveling the Parser: Anatomy of Custom JSX Conversion
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Parsing the Unparsed&lt;/strong&gt;&lt;br&gt;
At the heart of a JSX parser lies the task of dissecting seemingly intricate JSX code into its core building blocks. This involves recognizing JSX tags, components, and attributes, extracting the essentials required for the subsequent translation process.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Mapping the Unmapped&lt;/strong&gt;&lt;br&gt;
Once the parser deconstructs JSX, the next step involves mapping JSX elements and attributes to their corresponding HTML counterparts.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Expression Expedition&lt;/strong&gt;&lt;br&gt;
JSX isn't confined to static structures; it accommodates dynamic expressions too. A robust custom parser must seamlessly integrate these expressions into the final HTML output, ensuring the dynamic nature of JSX is preserved.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Babel Bonding&lt;/strong&gt;&lt;br&gt;
For those accustomed to working with Babel, a custom JSX parser should harmoniously integrate with this essential tool. This integration ensures that your custom parser works seamlessly within your existing development workflow.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The Practical Use-case for Custom JSX Parsing
&lt;/h2&gt;

&lt;p&gt;Creating your own JSX parser might seem like an academic exercise, but its has some practical applications:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Tailored Frameworks&lt;/strong&gt;&lt;br&gt;
If crafting a custom framework, a personalized JSX parser is invaluable. It guarantees smooth translation of framework components into standard HTML, retaining your design's essence.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Curiosity Unleashed&lt;/strong&gt;&lt;br&gt;
For those exploring JSX, modern ECMA, or Babel, an in-house JSX parser offers real-time feedback. It nurtures curiosity, aiding comprehension by simplifying complexities.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Transformative Power&lt;/strong&gt;&lt;br&gt;
Custom JSX parsing goes beyond theory. It's a potent tool for transforming JSX-based code into diverse formats, facilitating code migration and optimization.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The catch, Tackling Errors&lt;/strong&gt;&lt;br&gt;
Creating a JSX parser comes with challenges, particularly robust error handling. A proficient parser not only interprets correct code but guides developers in rectifying common mistakes or malformed expressions.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Guiding Transformation with @jsx Pragma in Babel
&lt;/h2&gt;

&lt;p&gt;In Babel's realm, the &lt;code&gt;@jsx&lt;/code&gt; pragma is pivotal. It directs the delicate dance between Babel and JSX during transpilation. As Babel encounters JSX, this pragma guides transformation according to your unique approach.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;@jsx&lt;/code&gt; pragma's adaptability shines when working with various libraries or frameworks. It seamlessly integrates JSX, enhancing versatility. Implementing it is as simple as adding a comment at your file's start:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fndlbem3elq8bf3r7qhal.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%2Fndlbem3elq8bf3r7qhal.png" alt="babel jsx pragma" width="800" height="317"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Crafting Your Custom JSX Parser
&lt;/h2&gt;

&lt;p&gt;Dive deeper with a code snippet showcasing the &lt;code&gt;dom()&lt;/code&gt; function—a simple yet potent JavaScript method. Armed with tag names, attributes, and children, it conjures an HTML entity for seamless DOM integration.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9dclel56hhh7iwdjgxk2.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%2F9dclel56hhh7iwdjgxk2.png" alt="dom jsx parser code" width="800" height="803"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This function operates in the following 4 basic steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Creating the HTML Element&lt;/strong&gt;&lt;br&gt;
It starts by creating an HTML element using the provided tagName.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Setting Attributes&lt;/strong&gt;&lt;br&gt;
The function sets attributes on the created element.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Adding Child Elements or Text Content&lt;/strong&gt;&lt;br&gt;
This step involves adding child elements or text content to the main element.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Returning the Constructed Element&lt;/strong&gt;&lt;br&gt;
Finally, the function returns the fully constructed HTML element.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Making it Real: Integrating into Familiar Syntax
&lt;/h2&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%2F61mlzre4f579etwyfuu7.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%2F61mlzre4f579etwyfuu7.png" alt="jsx syntax code" width="800" height="633"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;See the power of our custom JSX parser in action, integrated seamlessly into familiar JSX. Using @ngneat/falso (a Faker.js replacement), generate filler content dynamically. Demonstrating &lt;code&gt;randCatchPhrase()&lt;/code&gt;, &lt;code&gt;randUrl()&lt;/code&gt;, and &lt;code&gt;randParagraph()&lt;/code&gt; calls—each generating random content—our parser springs to life.&lt;/p&gt;

&lt;p&gt;CodePen Demo&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/mike-at-redspace/embed/yLRvazw?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Delving into the realm of custom JSX parsing offers insights beyond theoretical exploration. It's a pathway to enhancing frameworks, elevating education, optimizing code, and creating seamless integrations.&lt;/p&gt;

&lt;p&gt;The road to mastery might have its challenges, but the reward is a deeper understanding that enables you to create with even more precision and creativity.&lt;/p&gt;

&lt;p&gt;Happy Coding!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>jsx</category>
      <category>frontend</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>SSR-Proof Effects: Control Client-Side Lifecyles /w some React Magic</title>
      <dc:creator>Mike Vardy</dc:creator>
      <pubDate>Tue, 29 Aug 2023 13:00:00 +0000</pubDate>
      <link>https://dev.to/mike-at-redspace/ssr-proof-effects-control-client-side-lifecyles-w-some-react-magic-27kc</link>
      <guid>https://dev.to/mike-at-redspace/ssr-proof-effects-control-client-side-lifecyles-w-some-react-magic-27kc</guid>
      <description>&lt;p&gt;Cover Photo by &lt;a href="https://unsplash.com/@mildanat?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Anatvida Sukchanta&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/CFBoeNgZI3g?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;br&gt;
  &lt;/p&gt;

&lt;p&gt;When working with React on a project using Sever Side Rendering (SSR), you might often encounter situations where you need to perform certain actions after your component has been rendered on the client side. However, traditional hooks like &lt;code&gt;useEffect&lt;/code&gt; or &lt;code&gt;useLayoutEffect&lt;/code&gt; can sometimes execute their effects both on the server and client side, leading to suboptimal behaviour during server-side rendering (SSR). &lt;/p&gt;

&lt;p&gt;Enter the &lt;code&gt;useClientLayoutEffect&lt;/code&gt; custom hook – a solution that empowers you to control when an effect should run exclusively on the client side.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Benefits
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Client-Side Precision&lt;/strong&gt;&lt;br&gt;
Unlike regular effects, &lt;code&gt;useClientLayoutEffect&lt;/code&gt; ensures that your code is executed solely on the client side, avoiding any unnecessary server-side execution.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Optimized Performance&lt;/strong&gt;&lt;br&gt;
By avoiding unnecessary server-side effects, your application's performance can be enhanced, resulting in faster load times and smoother user experiences.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Consistent Behaviour&lt;/strong&gt;&lt;br&gt;
This custom hook maintains the familiar structure of React's effect hooks, making it easy to integrate into your existing components and workflows.&lt;/p&gt;


&lt;h2&gt;
  
  
  Use Cases for &lt;code&gt;useClientLayoutEffect&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;DOM Measurements&lt;/strong&gt; &lt;br&gt;
When you need to measure elements or perform layout calculations, using &lt;code&gt;useClientLayoutEffect&lt;/code&gt; guarantees that your calculations are based on the actual client-rendered DOM, eliminating inconsistencies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Third-Party Integrations&lt;/strong&gt; &lt;br&gt;
Integrating third-party libraries or widgets that depend on the window object becomes seamless, as the effects will only be triggered when the necessary client context is available.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Animations and Transitions&lt;/strong&gt; &lt;br&gt;
Applying animations and transitions often requires access to the client-side rendering engine. With &lt;code&gt;useClientLayoutEffect&lt;/code&gt;, you can ensure animations are smoothly initiated without SSR-related hiccups.&lt;/p&gt;



&lt;p&gt;And the code:&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;





&lt;p&gt;Whether you're measuring elements, integrating external libraries, or orchestrating animations, &lt;code&gt;useClientLayoutEffect&lt;/code&gt; empowers you to craft components that are not only functional but also optimized for a smooth user experience. It just might be a tool worth adding to your React hooks.&lt;/p&gt;

&lt;p&gt;So there you have it, a dynamic solution to ensure your effects are in sync with the client-side rendering cycle, leading to a more polished and efficient React application.&lt;/p&gt;

&lt;p&gt;Happy Coding!&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>tutorial</category>
      <category>node</category>
    </item>
    <item>
      <title>Building a Simple 🎶 Music Synthesizer 🎵 /w JavaScript</title>
      <dc:creator>Mike Vardy</dc:creator>
      <pubDate>Sun, 27 Aug 2023 14:16:01 +0000</pubDate>
      <link>https://dev.to/mike-at-redspace/building-a-simple-music-synthesizer-w-javascript-542c</link>
      <guid>https://dev.to/mike-at-redspace/building-a-simple-music-synthesizer-w-javascript-542c</guid>
      <description>&lt;p&gt;Cover Photo by &lt;a href="https://unsplash.com/@denisseleon?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Denisse Leon&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/OVEWbIgffDk?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;br&gt;
  &lt;/p&gt;

&lt;p&gt;Have you ever wanted to create your own digital musical instrument? In this tutorial, we're going to dive into the world of audio synthesis and JavaScript to build a simple music synthesizer right in your browser. With just a few functions, you'll be able to produce a variety of tones and melodies, creating your own unique musical experience.&lt;/p&gt;

&lt;p&gt;Before we start, why not take a quick listen to what we'll be building? Check out the live demo:&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/mike-at-redspace/embed/GRPopwv?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;




&lt;h2&gt;
  
  
  HTML Markup
&lt;/h2&gt;

&lt;p&gt;The HTML markup provides the foundation for our music synthesizer user interface. It consists of a catchy title, a row of buttons representing keyboard notes, and a dropdown menu to select different sound waveforms.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9a760lp4ynb0rlgz1ga9.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%2F9a760lp4ynb0rlgz1ga9.png" alt="html code" width="800" height="609"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Setup the Initial Variables
&lt;/h2&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%2Fwh2q0l6cf4hbz5lv512j.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%2Fwh2q0l6cf4hbz5lv512j.png" alt="Initial Variable code" width="800" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;getSelectedWaveform&lt;/code&gt;:
This function simply returns the currently selected waveform type from the dropdown. It helps us keep track of which sound wave shape we're using.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;selectedWaveform&lt;/code&gt;: This variable stores the selected waveform type (initially set to the default selected value from the dropdown).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;audioContext&lt;/code&gt;: This is an instance of the AudioContext, which is the central component for handling audio operations.
activeOscillators: This object keeps track of active oscillators (sounds currently playing).&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The &lt;code&gt;createOscillatorNode&lt;/code&gt; Function:
&lt;/h2&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%2Fni9ri3frhl74588nqg3b.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%2Fni9ri3frhl74588nqg3b.png" alt="createOscillatorNode code" width="800" height="584"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here, we define a function that sets up an oscillator and a gain node in the audio context. An oscillator is like the heart of a sound wave, and a gain node controls its volume. We specify the waveform type, frequency, and gradually increase the volume to avoid sudden clicks.&lt;/p&gt;




&lt;h2&gt;
  
  
  Playback Functions
&lt;/h2&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%2Fz4q4u96v4ttm4cljfqxf.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%2Fz4q4u96v4ttm4cljfqxf.png" alt="stop and play code" width="800" height="609"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;playSound&lt;/code&gt;: This function takes a frequency as input and plays a sound with that frequency. It uses the &lt;code&gt;createOscillatorNode&lt;/code&gt; function to create an oscillator if it's not already active. This helps us avoid overlapping sounds.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;stopSound&lt;/code&gt;: When we release a button or move the cursor away, we call this function. It smoothly decreases the sound's volume to avoid abrupt cutoffs and stops the oscillator, ensuring a clean stop.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The &lt;code&gt;setupButtonListeners&lt;/code&gt; Function:
&lt;/h2&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%2Fg77ifdu15hd0ayfu1rb0.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%2Fg77ifdu15hd0ayfu1rb0.png" alt="code to setupButtonListeners" width="800" height="463"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this function, we set up listeners for each note button. When you press a button, it triggers the &lt;code&gt;playSound&lt;/code&gt; function, and when you release it or move away, it triggers the &lt;code&gt;stopSound&lt;/code&gt; function. This gives you interactive control over the sound.&lt;/p&gt;




&lt;p&gt;Congratulations, you've just embarked on your journey into the world of audio synthesis! &lt;/p&gt;

&lt;p&gt;Whether you're a music enthusiast or a curious developer, this tutorial has equipped you to create, experiment, and explore the art of sound in the digital realm.&lt;/p&gt;

&lt;p&gt;Happy Coding!&lt;/p&gt;


&lt;div class="ltag__user ltag__user__id__1146731"&gt;
    &lt;a href="/mike-at-redspace" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__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%2F1146731%2Fe8ed28e7-ffbc-4937-9cae-b8054c3f75c1.png" alt="mike-at-redspace image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/mike-at-redspace"&gt;Mike Vardy&lt;/a&gt;Follow
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/mike-at-redspace"&gt;A senior full stack web developer with over a decade of experience creating engaging web experiences for top brands using React and Node.JS&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>codepen</category>
      <category>javascript</category>
      <category>music</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Build a Animated Emoji Selector /w React, Noto &amp; Lottie Animations</title>
      <dc:creator>Mike Vardy</dc:creator>
      <pubDate>Sat, 26 Aug 2023 22:53:02 +0000</pubDate>
      <link>https://dev.to/mike-at-redspace/noto-emoji-emoji-selector-1e9k</link>
      <guid>https://dev.to/mike-at-redspace/noto-emoji-emoji-selector-1e9k</guid>
      <description>&lt;p&gt;Cover Photo by &lt;a href="https://unsplash.com/@domingoalvarze?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Domingo Alvarez E&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/Cs3y8Mn6-Gk?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;br&gt;
  &lt;/p&gt;

&lt;p&gt;I stumbled upon Google's new Animated &lt;a href="https://fonts.google.com/noto/specimen/Noto+Color+Emoji" rel="noopener noreferrer"&gt;Noto Emojis&lt;/a&gt;, and let me tell you, they are seriously impressive. These emojis aren't just your regular old static icons—they come alive with buttery smooth animations, all thanks to the power of Lottie.&lt;/p&gt;

&lt;p&gt;As I was checking them out, a thought struck me: "&lt;em&gt;Wouldn't it be cool if there was a easier way to explore these?&lt;/em&gt;" And that's when I had my lightbulb moment. I decided to put whip something quick together, the end result turned out really fun. &lt;/p&gt;

&lt;p&gt;You can actually play around with a live demo of below. Trust me, it's an absolute blast. Go ahead and give it a spin.&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/mike-at-redspace/embed/PoXPrgQ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  What are LottieFiles?
&lt;/h2&gt;

&lt;p&gt;Lottie is a file format for animations, using JSON. This format makes it incredibly simple to include animations on various platforms, just like you would with static images. These files are compact and function seamlessly on all sorts of devices. &lt;/p&gt;

&lt;p&gt;They're flexible too! Just like SVG and other vector formats, you can adjust their size without worrying about losing image quality.&lt;/p&gt;




&lt;h2&gt;
  
  
  Designing the Emoji Dropdown
&lt;/h2&gt;

&lt;p&gt;Our journey kicks off with designing the emoji dropdown. Now, to keep our code organized and our development experience smooth, we'll start by creating a separate component called &lt;code&gt;EmojiDropdown&lt;/code&gt;. This component will take care of all the nitty-gritty details involved in selecting an emoji.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi0k9tpj3i4j392gbszd8.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%2Fi0k9tpj3i4j392gbszd8.png" alt="EmojiDropdown.js code snippet" width="800" height="949"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Making Emojis Come Alive: The Emoji Display
&lt;/h2&gt;

&lt;p&gt;Next up, we're building the &lt;code&gt;EmojiDisplay&lt;/code&gt; component. This is where the magic happens! With the Lottie animation library included and the Google Font CDN path, we'll animate the selected emoji and bring it to life.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhjq1rfdlifa0wfh3eg9c.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%2Fhjq1rfdlifa0wfh3eg9c.png" alt="EmojiDisplay.js code snippet" width="800" height="609"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Crafting the UI: The Main &lt;code&gt;EmojiSelector&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Now it's time to put the pieces together. In this step, we'll craft the main event: the &lt;code&gt;EmojiSelector&lt;/code&gt; component. With this component, we manage emoji selection and the open/closed state of our dropdown.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx40ov7hwbw8rau0lgt1w.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%2Fx40ov7hwbw8rau0lgt1w.png" alt="EmojiSelector.js code snippet" width="800" height="852"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;High-fives, you've unlocked the secrets of building an awesome emoji selector component for Google's new Noto Animated Font. &lt;/p&gt;

&lt;p&gt;Head over to the &lt;a href="https://codepen.io/mike-at-redspace/pen/PoXPrgQ" rel="noopener noreferrer"&gt;CodePen&lt;/a&gt; for the full code. Happy coding and emoji picking!&lt;/p&gt;





&lt;div class="ltag__user ltag__user__id__1146731"&gt;
    &lt;a href="/mike-at-redspace" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__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%2F1146731%2Fe8ed28e7-ffbc-4937-9cae-b8054c3f75c1.png" alt="mike-at-redspace image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/mike-at-redspace"&gt;Mike Vardy&lt;/a&gt;Follow
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/mike-at-redspace"&gt;A senior full stack web developer with over a decade of experience creating engaging web experiences for top brands using React and Node.JS&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;&lt;br&gt;
If you're interested in learning more about animated emojis, I highly recommend checking out Jennifer Daniel's blog post titled &lt;a href="https://developers.googleblog.com/2022/09/updates-to-emoji-new-characters-animation-colors-and-more.html" rel="noopener noreferrer"&gt;Updates to Emoji: New Characters, New Animation, New Color Customization, and More!&lt;/a&gt;&lt;br&gt;
  &lt;/p&gt;

</description>
      <category>codepen</category>
      <category>react</category>
      <category>tutorial</category>
      <category>design</category>
    </item>
    <item>
      <title>-webkit-box-reflect Property: Creating Reflection Effects in CSS</title>
      <dc:creator>Mike Vardy</dc:creator>
      <pubDate>Sat, 26 Aug 2023 17:41:26 +0000</pubDate>
      <link>https://dev.to/mike-at-redspace/-webkit-box-reflect-property-creating-reflection-effects-in-css-2jah</link>
      <guid>https://dev.to/mike-at-redspace/-webkit-box-reflect-property-creating-reflection-effects-in-css-2jah</guid>
      <description>&lt;p&gt;Cover Photo by &lt;a href="https://unsplash.com/@juanster?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Juan Davila&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/P8PlK2nGwqA?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Have you ever come across web designs that feature stunning reflection effects on text or image elements? These captivating designs often leave us wondering about the underlying sorcery that brings them to life. Enter the &lt;code&gt;-webkit-box-reflect&lt;/code&gt; CSS property—lesser-known gem that allows you to conjure reflection effects on your web content. &lt;/p&gt;

&lt;p&gt;In this post, we'll delve into the magic of &lt;code&gt;-webkit-box-reflect&lt;/code&gt; and explore how it can be harnessed to create eye-catching reflections in your designs.&lt;/p&gt;

&lt;p&gt;Below is a live demo where you can see the &lt;code&gt;-webkit-box-reflect property&lt;/code&gt; in action:&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/mike-at-redspace/embed/WNLQBOx?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;




&lt;h2&gt;
  
  
  The Power of Reflections
&lt;/h2&gt;

&lt;p&gt;Reflections add depth and elegance to your web designs. They create an illusion of elements being displayed on a reflective surface like glass or water. This technique has been used to add sophistication to various user interfaces, product showcases, and artistic displays.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;-webkit-box-reflect&lt;/code&gt; property, although prefixed for WebKit browsers like Safari and older versions of Chrome, lets you achieve these effects with ease.&lt;/p&gt;

&lt;p&gt;At the time of writing we are still waiting for support in Firefox &amp;amp; Opera, and it limited to only newer versions of Edge &lt;a href="https://caniuse.com/?search=-webkit-box-reflect" rel="noopener noreferrer"&gt;full support details&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftxlrxg2o3zz2mk6en55o.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%2Ftxlrxg2o3zz2mk6en55o.png" alt="broswer support for -webkit-box-reflect" width="800" height="338"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Basic Syntax
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;above&lt;/code&gt;, &lt;code&gt;below&lt;/code&gt;, &lt;code&gt;right&lt;/code&gt;, &lt;code&gt;left&lt;/code&gt;&lt;br&gt;
Are keywords indicating in which direction the reflection is to happen.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;length&amp;gt;&lt;/code&gt;&lt;br&gt;
Indicates the size of the reflection.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;image&amp;gt;&lt;/code&gt;&lt;br&gt;
Describes the mask to be applied to the reflection.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd88v1tdrbg3ed6xngm5o.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%2Fd88v1tdrbg3ed6xngm5o.png" alt="reflection syntax" width="800" height="633"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Basic Reflection
&lt;/h2&gt;

&lt;p&gt;This code snippet below adds a basic reflection effect below the element's content.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpv42rg4jz8cqrgjpiwv2.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%2Fpv42rg4jz8cqrgjpiwv2.png" alt="css Basic Reflection" width="800" height="366"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Right-Side Reflection
&lt;/h2&gt;

&lt;p&gt;This snippet creates a reflection on the right side of the element.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpmyradfnbcunof7twrwz.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%2Fpmyradfnbcunof7twrwz.png" alt="css Right-Side Reflection" width="800" height="366"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Masking the Reflection Source
&lt;/h2&gt;

&lt;p&gt;In this snippet, the reflection is masked by the element's box, and the reflection source is stretched to fill the reflection area.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2fr2v6fbjeirgczyx1v8.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%2F2fr2v6fbjeirgczyx1v8.png" alt="Masking the Reflection Source css" width="800" height="366"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Repeating the Masked Reflection Source
&lt;/h2&gt;

&lt;p&gt;The masked source image is repeated within the reflection area. This reflection effect resembles ripples in water.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdhio0s7vz4roxrijeffw.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%2Fdhio0s7vz4roxrijeffw.png" alt="Repeating the Masked Reflection css" width="800" height="366"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Combining Reflections
&lt;/h2&gt;

&lt;p&gt;To achieve a dual reflection both above and to the right of the element use this approach.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0lqxe2y7uph1jkapsgvj.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%2F0lqxe2y7uph1jkapsgvj.png" alt="css Combining Reflections" width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Limitations and Considerations
&lt;/h2&gt;

&lt;p&gt;Despite its enchanting capabilities, the &lt;code&gt;-webkit-box-reflect property&lt;/code&gt; has a few limitations to keep in mind:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Browser Support:&lt;/strong&gt; This property is mainly supported by older WebKit-based browsers. Modern browsers might not consistently render the effects.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Responsiveness:&lt;/strong&gt; Reflections created using this property aren't inherently responsive. Media queries might be needed for different screen sizes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Limited Customization:&lt;/strong&gt; Compared to other techniques, customization options for reflections are somewhat limited.&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;Feel free to tinker with the &lt;a href="https://codepen.io/mike-at-redspace/pen/WNLQBOx" rel="noopener noreferrer"&gt;CodePen&lt;/a&gt; and experiment with different reflection effects to get a hands-on understanding of how the &lt;code&gt;-webkit-box-reflect&lt;/code&gt; property works. &lt;/p&gt;

&lt;p&gt;Enjoy the journey of adding captivating reflections to your web design toolkit!&lt;/p&gt;


&lt;div class="ltag__user ltag__user__id__1146731"&gt;
    &lt;a href="/mike-at-redspace" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__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%2F1146731%2Fe8ed28e7-ffbc-4937-9cae-b8054c3f75c1.png" alt="mike-at-redspace image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/mike-at-redspace"&gt;Mike Vardy&lt;/a&gt;Follow
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/mike-at-redspace"&gt;A senior full stack web developer with over a decade of experience creating engaging web experiences for top brands using React and Node.JS&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>css</category>
      <category>tutorial</category>
      <category>codepen</category>
      <category>design</category>
    </item>
    <item>
      <title>Crafting Modal in ReactJS: A Quick Guide Using HTML &lt;dialog&gt; &amp; React Portals</title>
      <dc:creator>Mike Vardy</dc:creator>
      <pubDate>Sat, 26 Aug 2023 11:45:27 +0000</pubDate>
      <link>https://dev.to/mike-at-redspace/crafting-modal-dialogs-in-reactjs-a-guide-using-html-and-react-portals-30ja</link>
      <guid>https://dev.to/mike-at-redspace/crafting-modal-dialogs-in-reactjs-a-guide-using-html-and-react-portals-30ja</guid>
      <description>&lt;p&gt;Cover Photo by &lt;a href="https://unsplash.com/@logan_lense?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Logan Moreno Gutierrez&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/70ter_ma2j0?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Modal dialogs are an indispensable tool in web applications, streamlining user interactions &amp;amp; providing a place for focused interactions. In this quick post, we'll delve into creating accessible modal dialogs in ReactJS using the new HTML &lt;code&gt;&amp;lt;dialog&amp;gt;&lt;/code&gt; element and React Portals.&lt;/p&gt;

&lt;p&gt;By combining the native capabilities of HTML5 with React's adaptability, we can construct modal dialogs that not only function smoothly but also cater to all users, including those who rely on screen readers.&lt;/p&gt;

&lt;p&gt;Here’s a live demo of what we’re going to build!&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/mike-at-redspace/embed/VwqvNWy?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;




&lt;p&gt;Before we delve into the implementation, let's highlight the two key ingredients we'll be using:&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;HTML&lt;/strong&gt; &lt;code&gt;&amp;lt;dialog&amp;gt;&lt;/code&gt; &lt;strong&gt;Element&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;&amp;lt;dialog&amp;gt;&lt;/code&gt; element, an inherent feature of HTML5, enables the creation of modal dialogs sans external libraries. It offers a straightforward way to overlay content atop the current page, preventing interaction with the underlying content until the dialog is dismissed.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;React Portals&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;React Portals provide a mechanism to render components outside the regular DOM hierarchy. This is particularly handy when dealing with components like modal dialogs that require precise positioning relative to the viewport or other elements.&lt;/p&gt;




&lt;p&gt;Let's start crafting an accessible modal dialog component by combining the strengths of the HTML &lt;code&gt;&amp;lt;dialog&amp;gt;&lt;/code&gt; element and React Portals.&lt;/p&gt;

&lt;h2&gt;
  
  
  Create the &lt;code&gt;Modal&lt;/code&gt; Component
&lt;/h2&gt;

&lt;p&gt;Assuming your React project is up and running, go ahead and create a new file named &lt;code&gt;Modal.js&lt;/code&gt;. Here's a snippet to get you started:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5li3e8792l700400mrcn.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%2F5li3e8792l700400mrcn.png" alt="screenshot of the code for Modal.js" width="800" height="976"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Styling and Accessibility Considerations
&lt;/h2&gt;

&lt;p&gt;When building modal dialogs, several factors need attention: keyboard navigation, focus management, meaningful information for screen readers. Take note of the following considerations in the example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;&amp;lt;h2&amp;gt;&lt;/code&gt; element with the id &lt;code&gt;"dialog-title"&lt;/code&gt; serves as a descriptive title for the dialog.&lt;/li&gt;
&lt;li&gt;The "Close" button is not only adorned with a meaningful label but also carries a CSS class for effortless styling.&lt;/li&gt;
&lt;li&gt;An &lt;code&gt;aria-modal&lt;/code&gt; attribute signifies that the dialog is indeed modal.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Integrate the Component
&lt;/h2&gt;

&lt;p&gt;Now, it's time to integrate your freshly baked Modal component into your main application file (often &lt;code&gt;App.js&lt;/code&gt;). Don't forget to include a button to trigger the opening of the modal dialog. Here's how it might look:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F35th9r4z4sbyhplnuvxq.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%2F35th9r4z4sbyhplnuvxq.png" alt="screenshot of the code for App.js" width="800" height="947"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;In this quick post, we've combined the HTML &lt;code&gt;&amp;lt;dialog&amp;gt;&lt;/code&gt; element and React Portals to craft modal dialogs that seamlessly integrate accessibility, functionality.&lt;/p&gt;

&lt;p&gt;This approach also comes with some SEO benefits. Search engines favour accessible and well-structured content, boosting your website's visibility and search rankings.&lt;/p&gt;

&lt;p&gt;Also, when it comes to choosing a rendering approach, React Portals emerge as the superior choice. They facilitate clean code separation, maintaining the integrity of your application's architecture.&lt;/p&gt;

&lt;p&gt;Happy coding, as you transform your web applications into hubs of accessibility and SEO excellence! Here's to hoping your users find your new Modal more user friendly then those GDPR "we use cookies" pop-ups.&lt;/p&gt;


&lt;div class="ltag__user ltag__user__id__1146731"&gt;
    &lt;a href="/mike-at-redspace" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__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%2F1146731%2Fe8ed28e7-ffbc-4937-9cae-b8054c3f75c1.png" alt="mike-at-redspace image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/mike-at-redspace"&gt;Mike Vardy&lt;/a&gt;Follow
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/mike-at-redspace"&gt;A senior full stack web developer with over a decade of experience creating engaging web experiences for top brands using React and Node.JS&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;&lt;br&gt;
If you're interested in diving deeper, I highly recommend checking out the blog post titled &lt;a href="https://web.dev/building-a-dialog-component/" rel="noopener noreferrer"&gt;Building a dialog component&lt;/a&gt; by Adam Argyle. This post delves into the intricacies of designing modal dialogs that not only meet accessibility standards but also provide an outstanding user experience.&lt;br&gt;
  &lt;/p&gt;

</description>
      <category>react</category>
      <category>a11y</category>
      <category>ui</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
