<!DOCTYPE html>
<html>
<head>
<title>Bytes: A tale of two Reacts</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="color-scheme" content="light dark">
<meta name="supported-color-schemes" content="light dark">
<link href="https://fonts.googleapis.com/css2?family=Fira+Mono&family=Outfit:wght@400;500;700;900&family=Paytone+One" rel="stylesheet">
<style>@media (prefers-color-scheme: dark) {
.email-wrapper {
color: #F9F4DA !important;
background-color: #0F0D0E !important;
}
hr {
border-color: #262422 !important;
}
mark {
background-color: #231F20 !important;
color: #F9F4DA !important;
}
pre {
background-color: #231F20 !important;
border: 1px solid #231F20 !important;
color: #F9F4DA !important;
}
.bg-alt {
background-color: #231F20 !important;
}
.unsubscribe-link {
color: #504C48 !important;
}
.token.punctuation {
color: #f9f4da !important;
}
}
@media screen and (min-width: 600px) {
.mobile-break {
display: none;
}
}</style>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<table class="email-wrapper" border="0" cellspacing="0" width="100%" style="background-color: #FFF; border-collapse: collapse; color: #231F20; font-family: Outfit, sans-serif; font-size: 16px; width: 100%;"><tbody><tr>
<td style="border-collapse: collapse !important; word-break: normal;"></td>
<td width="600px" style="border-collapse: collapse !important; width: 600px; word-break: normal;"><div style="max-width:600px;padding-top:80px">
<div style="text-align:center"><img width="600" style="max-width: 100%; padding-bottom: 40px;" src="https://bytes.dev/images/bytes-banner-rounded.png" alt="Bytes"></div>
<p style="font-family: Outfit, sans-serif; font-size: 17px; line-height: 1.5; padding-left: 24px; padding-right: 24px;"><strong style="font-weight: 600;">Today’s issue:</strong> The Satoshi of web dev strikes again, HTML gateway drugs, and serenading your type checker with Raining Blood.</p>
<p style="font-family: Outfit, sans-serif; font-size: 17px; line-height: 1.5; padding-left: 24px; padding-right: 24px;">Welcome to <a href="https://click.kit-mail6.com/n4ugqg6788hvhxe69wmc6h68xz5ggflho53w/n2hohquvr7zm00h6/aHR0cHM6Ly9ieXRlcy5kZXYvYXJjaGl2ZXMvNDQ4" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1814422288">#448</a>.</p>
<hr style="border: 0; border-bottom: 5px solid; border-color: #f5f5f5; margin-bottom: 100px; margin-top: 100px;">
<div style="text-align:center;margin-bottom:36px">
<img width="80" src="https://bytes.dev/images/content/eyes.png" alt="Eyeballs logo" style="max-width: 100%;"><h2 style="font-family: Paytone One, sans-serif; font-size: 28px; margin-top: 10px; text-transform: uppercase;">The Main Thing</h2>
</div>
<div class="bg-alt" style="background-color: #f5f5f5; border-radius: 16px; margin-bottom: 40px; max-width: 100%; padding: 24px; padding-bottom: 12px;">
<img src="https://bytes.dev/images/content/luigi-drown.jpg" alt="Luigi drowning in a pool" width="600" style="border-radius: 5px; max-width: 100%;"><p style="font-family: Outfit, sans-serif; font-size: 15px; font-style: italic; line-height: 1; margin: 0; padding-bottom: 4px; padding-left: 24px; padding-right: 24px; padding-top: 10px; text-align: center;">Average React developer this week<!-- --> </p>
</div>
<h3 style="font-size: 24px; margin-bottom: 0; padding-left: 24px; padding-right: 24px;">A tale of two Reacts</h3>
<p style="font-family: Outfit, sans-serif; font-size: 17px; line-height: 1.5; padding-left: 24px; padding-right: 24px;">It was the best of times (for React Native developers), it was the worst of times (for React developers).</p>
<p style="font-family: Outfit, sans-serif; font-size: 17px; line-height: 1.5; padding-left: 24px; padding-right: 24px;"><strong style="font-weight: 600;">Let’s start with the worst:</strong> Researchers discovered <a href="https://click.kit-mail6.com/n4ugqg6788hvhxe69wmc6h68xz5ggflho53w/48hvh7umgx4v8eux/aHR0cHM6Ly9yZWFjdC5kZXYvYmxvZy8yMDI1LzEyLzExL2RlbmlhbC1vZi1zZXJ2aWNlLWFuZC1zb3VyY2UtY29kZS1leHBvc3VyZS1pbi1yZWFjdC1zZXJ2ZXItY29tcG9uZW50cw==" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1814422289">two more critical vulnerabilities</a> in React Server Components this week while trying to exploit the patches for last week’s React2Shell incident – a Denial of Service vulnerability and a Source Code Exposure vulnerability.</p>
<p style="font-family: Outfit, sans-serif; font-size: 17px; line-height: 1.5; padding-left: 24px; padding-right: 24px;">Yes we’re all in hell, but apparently it’s common for critical CVEs to uncover “follow‑up vulnerabilities” like this. The React team is promising that “just one more upgrade bro” will fix everything for good, and hopefully the latest patched version will let React developers feel joy again. Alternatively, you could just downgrade everything to React 15, dust off ye olde class components, and pretend that RSC was just one collective fever dream. Oh wait, I think Remix 3 is already working on that.</p>
<p style="font-family: Outfit, sans-serif; font-size: 17px; line-height: 1.5; padding-left: 24px; padding-right: 24px;"><strong style="font-weight: 600;">In more positive news,</strong> the React Native team is still cooking. They just shipped their <em>seventh</em> release of 2025 with <a href="https://click.kit-mail6.com/n4ugqg6788hvhxe69wmc6h68xz5ggflho53w/wnh2h6uqg0en62h7/aHR0cHM6Ly9yZWFjdG5hdGl2ZS5kZXYvYmxvZy8yMDI1LzEyLzEwL3JlYWN0LW5hdGl2ZS0wLjgz" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1814422290">React Native 0.83</a> – which doesn’t introduce any user-facing breaking changes but <em>does</em> come with some meaningful upgrades:</p>
<ul>
<li>
<p style="font-family: Outfit, sans-serif; font-size: 17px; line-height: 1.5;"><strong style="font-weight: 600;">React 19.2 support</strong> — This brings the <code style="font-size: 14px;"><Activity></code> and <code style="font-size: 14px;">useEffectEvent</code> APIs to React Native, which keeps it aligned with modern React while thankfully avoiding the current RSC mess.</p>
</li>
<li>
<p style="font-family: Outfit, sans-serif; font-size: 17px; line-height: 1.5;"><strong style="font-weight: 600;">Big DevTools upgrades</strong> — New Network and Performance panels let you inspect requests and trace JavaScript execution, React renders, and user timings in a single timeline. It’s basically Chrome DevTools for React Native.</p>
</li>
<li>
<p style="font-family: Outfit, sans-serif; font-size: 17px; line-height: 1.5;"><strong style="font-weight: 600;">Web platform momentum</strong> — Web Performance APIs are now stable, and <code style="font-size: 14px;">IntersectionObserver</code> landed in Canary as part of the RN team’s push to make our “write once, run anywhere” dreams come true across web and native.</p>
</li>
</ul>
<p style="font-family: Outfit, sans-serif; font-size: 17px; line-height: 1.5; padding-left: 24px; padding-right: 24px;"><strong style="font-weight: 600;">Bottom Line:</strong> If only Dickens could’ve lived to see our day and write generation-defining novels about Denial of Service vulnerabilities and <code style="font-size: 14px;">useEffectEvent</code>.</p>
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse: collapse; margin-top: 40px; text-align: center;"><tbody><tr><td style="border-collapse: collapse !important; padding-top: 12px; word-break: normal;">
<a href="https://click.kit-mail6.com/n4ugqg6788hvhxe69wmc6h68xz5ggflho53w/reh8h9umx6g4zgf2/aHR0cHM6Ly9mYWNlYm9vay5jb20vc2hhcmVyL3NoYXJlci5waHA_dT1odHRwcyUzQSUyRiUyRmJ5dGVzLmRldiUyRmFyY2hpdmVzJTJGNDQ4" rel="noopener" style="color: #12b5e5; font-weight: 600; padding-left: 5px; text-decoration: none;" target="_blank" url-id="1814422291"><img alt="" style="display: inline-block; max-width: 100%; width: 32px;" width="25" src="https://bytes.dev/images/fb-share-icon.png"></a><a href="https://click.kit-mail6.com/n4ugqg6788hvhxe69wmc6h68xz5ggflho53w/08hwhgu2zl3vrlul/aHR0cHM6Ly93d3cubGlua2VkaW4uY29tL3NoYXJpbmcvc2hhcmUtb2Zmc2l0ZS8_dXJsPWh0dHBzJTNBJTJGJTJGYnl0ZXMuZGV2JTJGYXJjaGl2ZXMlMkY0NDg=" rel="noopener" style="color: #12b5e5; font-weight: 600; padding-left: 5px; text-decoration: none;" target="_blank" url-id="1814422292"><img alt="" style="display: inline-block; max-width: 100%; width: 32px;" width="25" src="https://bytes.dev/images/li-share-icon.png"></a><a href="https://click.kit-mail6.com/n4ugqg6788hvhxe69wmc6h68xz5ggflho53w/8ghqh3uo9rmzn7fk/aHR0cHM6Ly90d2l0dGVyLmNvbS9pbnRlbnQvdHdlZXQvP3RleHQ9SXQlMjB3YXMlMjB0aGUlMjBiZXN0JTIwb2YlMjB0aW1lcyUyMCUyOGZvciUyMFJlYWN0JTIwTmF0aXZlJTIwZGV2ZWxvcGVycyUyOSUyQyUyMGl0JTIwd2FzJTIwdGhlJTIwd29yc3QlMjBvZiUyMHRpbWVzJTIwJTI4Zm9yJTIwUmVhY3QlMjBkZXZlbG9wZXJzJTI5JnVybD1odHRwcyUzQSUyRiUyRmJ5dGVzLmRldiUyRmFyY2hpdmVzJTJGNDQ4" rel="noopener" style="color: #12b5e5; font-weight: 600; padding-left: 5px; text-decoration: none;" target="_blank" url-id="1814422293"><img alt="" style="display: inline-block; max-width: 100%; width: 32px;" width="25" src="https://bytes.dev/images/tw-share-icon.png"></a><a href="https://click.kit-mail6.com/n4ugqg6788hvhxe69wmc6h68xz5ggflho53w/vqh3hmuogwzlr6tg/bWFpbHRvOj9ib2R5PVRob3VnaHQlMjB5b3UlMjdkJTIwbG92ZSUyMHRoaXMlMjB3ZWVrJTI3cyUyMEJ5dGVzJTBBLS0tJTBBSXQlMjB3YXMlMjB0aGUlMjBiZXN0JTIwb2YlMjB0aW1lcyUyMCUyOGZvciUyMFJlYWN0JTIwTmF0aXZlJTIwZGV2ZWxvcGVycyUyOSUyQyUyMGl0JTIwd2FzJTIwdGhlJTIwd29yc3QlMjBvZiUyMHRpbWVzJTIwJTI4Zm9yJTIwUmVhY3QlMjBkZXZlbG9wZXJzJTI5JTBBaHR0cHMlM0ElMkYlMkZieXRlcy5kZXYlMkZhcmNoaXZlcyUyRjQ0OCZzdWJqZWN0PVlvdSUyMGxpa2UlMjBjb3JuYnJlYWQlM0Y=" rel="noopener" style="color: #12b5e5; font-weight: 600; padding-left: 5px; text-decoration: none;" target="_blank" url-id="1814422294"><img alt="" style="display: inline-block; max-width: 100%; width: 32px;" width="25" src="https://bytes.dev/images/em-share-icon.png"></a>
</td></tr></tbody></table>
<hr style="border: 0; border-bottom: 5px solid; border-color: #f5f5f5; margin-bottom: 100px; margin-top: 100px;">
<div style="text-align:center;margin-bottom:36px">
<img width="150" src="https://bytes.dev/images/content/coderabbit-logo.png" alt="CodeRabbit logo" style="max-width: 100%;"><h2 style="font-family: Paytone One, sans-serif; font-size: 28px; margin-top: 10px; text-transform: uppercase;"><span>Our Friends <br class="mobile-break">(With Benefits)</span></h2>
</div>
<div class="bg-alt" style="background-color: #f5f5f5; border-radius: 16px; margin-bottom: 40px; max-width: 100%; padding: 24px; padding-bottom: 12px;">
<img src="https://bytes.dev/images/content/dog-utopia.jpg" alt="A bunch of dogs meditating" width="600" style="border-radius: 5px; max-width: 100%;"><p style="font-family: Outfit, sans-serif; font-size: 15px; font-style: italic; line-height: 1; margin: 0; padding-bottom: 4px; padding-left: 24px; padding-right: 24px; padding-top: 10px; text-align: center;">When your team’s code reviews finally evolve past ‘LGTM’<!-- --> </p>
</div>
<h3 style="font-size: 24px; margin-bottom: 0; padding-left: 24px; padding-right: 24px;"><a href="https://click.kit-mail6.com/n4ugqg6788hvhxe69wmc6h68xz5ggflho53w/l2heh6ulrx8e7gb6/aHR0cHM6Ly9jb2RlcmFiYml0LmxpbmsvYnl0ZXM=" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1814422295">Unlock tribal Knowledge in teams. Make code reviews actually fun</a></h3>
<p style="font-family: Outfit, sans-serif; font-size: 17px; line-height: 1.5; padding-left: 24px; padding-right: 24px;">Most teams treat code review like a gate. Smart teams use it as a knowledge distribution system. With CodeRabbit, you turn your hidden “how we really do things here” into reusable learnings that make every PR clearer, faster, and less annoying.</p>
<p style="font-family: Outfit, sans-serif; font-size: 17px; line-height: 1.5; padding-left: 24px; padding-right: 24px;">Take logging. Maybe your team requires a custom logger, specific error tracking, and different log levels per environment. In practice, new code ships with random utilities, generic <code style="font-size: 14px;">console.log</code>s, or half-remembered conventions – especially under deadline pressure.</p>
<p style="font-family: Outfit, sans-serif; font-size: 17px; line-height: 1.5; padding-left: 24px; padding-right: 24px;">CodeRabbit catches that drift automatically and creates learnings. You define the rule once: “For app/lib/components, use <code style="font-size: 14px;">logError()</code> from <code style="font-size: 14px;">@/lib/error-tracking</code>.” From then on, CodeRabbit flags violations in PRs, so human reviewers can focus on intent instead of nitpicks.</p>
<p style="font-family: Outfit, sans-serif; font-size: 17px; line-height: 1.5; padding-left: 24px; padding-right: 24px;">The result: tribal knowledge becomes searchable, standards become actually enforced, and reviews stop feeling like passive-aggressive checklists.</p>
<p style="font-family: Outfit, sans-serif; font-size: 17px; line-height: 1.5; padding-left: 24px; padding-right: 24px;">Free for open source projects. <a href="https://click.kit-mail6.com/n4ugqg6788hvhxe69wmc6h68xz5ggflho53w/l2heh6ulrx8e7gb6/aHR0cHM6Ly9jb2RlcmFiYml0LmxpbmsvYnl0ZXM=" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1814422295">Sign up today</a>.</p>
<hr style="border: 0; border-bottom: 5px solid; border-color: #f5f5f5; margin-bottom: 100px; margin-top: 100px;">
<div style="text-align:center;margin-bottom:36px">
<img width="110" src="https://bytes.dev/images/content/spot-the-bug.png" alt="Spot the Bug logo" style="max-width: 100%;"><h2 style="font-family: Paytone One, sans-serif; font-size: 28px; margin-top: 10px; text-transform: uppercase;">Spot the Bug</h2>
<div class="section-presenter" style="margin-bottom:50px;margin-top:15px">
<h4 style="font-size: 19px; margin-bottom: 0; padding-left: 24px; padding-right: 24px;">Sponsored by <a href="https://click.kit-mail6.com/n4ugqg6788hvhxe69wmc6h68xz5ggflho53w/m2h7h6u3e4dvpkfm/aHR0cHM6Ly9ibG9nLnNlbnRyeS5pby9maXgtbi1wbHVzLW9uZS1kYXRhYmFzZS1pc3N1ZXMtd2l0aC1zZW50cnktc2Vlci8_dXRtX2NhbXBhaWduPXNlZXItZnkyNnE0LWV2ZXJncmVlbiZ1dG1fY29udGVudD1uZXdzbGV0dGVyLW4xLXF1ZXJ5LWJsb2ctbGVhcm5tb3JlJnV0bV9tZWRpdW09cGFpZC1jb21tdW5pdHkmdXRtX3NvdXJjZT1ieXRlcw==" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1814422296">Sentry</a>
</h4>
<p style="font-family: Outfit, sans-serif; font-size: 16px; line-height: 1.5; margin-top: 5px; padding-left: 24px; padding-right: 24px;"><em>N+1 Queries are one of the most annoying performance issues out there, but <a href="https://click.kit-mail6.com/n4ugqg6788hvhxe69wmc6h68xz5ggflho53w/m2h7h6u3e4dvpkfm/aHR0cHM6Ly9ibG9nLnNlbnRyeS5pby9maXgtbi1wbHVzLW9uZS1kYXRhYmFzZS1pc3N1ZXMtd2l0aC1zZW50cnktc2Vlci8_dXRtX2NhbXBhaWduPXNlZXItZnkyNnE0LWV2ZXJncmVlbiZ1dG1fY29udGVudD1uZXdzbGV0dGVyLW4xLXF1ZXJ5LWJsb2ctbGVhcm5tb3JlJnV0bV9tZWRpdW09cGFpZC1jb21tdW5pdHkmdXRtX3NvdXJjZT1ieXRlcw==" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1814422296">this article</a> shows how you can eliminate them with Seer’s (Sentry’s AI debugger) automated root cause analysis tool.</em></p>
</div>
</div>
<pre class="language-js" style="background-color: #f9f9f9; border: 1px solid #f9f9f9; border-radius: 8px; color: #231F20; overflow: auto; padding: 24px;"><code class="language-js" style="font-size: 14px;"><span class="token keyword" style="color: #f38ba3; font-size: 14px;">import</span> db <span class="token keyword" style="color: #f38ba3; font-size: 14px;">from</span> <span class="token string" style="color: #f99157; font-size: 14px;">"./db"</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">;</span>
<span class="token keyword" style="color: #f38ba3; font-size: 14px;">import</span> admin <span class="token keyword" style="color: #f38ba3; font-size: 14px;">from</span> <span class="token string" style="color: #f99157; font-size: 14px;">"firebase-admin"</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">;</span>
<span class="token keyword" style="color: #f38ba3; font-size: 14px;">import</span> <span class="token punctuation" style="color: #231F20; font-size: 14px;">{</span> getUserClaimsFromCookie <span class="token punctuation" style="color: #231F20; font-size: 14px;">}</span> <span class="token keyword" style="color: #f38ba3; font-size: 14px;">from</span> <span class="token string" style="color: #f99157; font-size: 14px;">"./claims"</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">;</span>
<span class="token keyword" style="color: #f38ba3; font-size: 14px;">const</span> <span class="token punctuation" style="color: #231F20; font-size: 14px;">{</span> arrayUnion<span class="token punctuation" style="color: #231F20; font-size: 14px;">,</span> arrayRemove <span class="token punctuation" style="color: #231F20; font-size: 14px;">}</span> <span class="token operator" style="color: #12b5e5; font-size: 14px;">=</span> admin<span class="token punctuation" style="color: #231F20; font-size: 14px;">.</span>firestore<span class="token punctuation" style="color: #231F20; font-size: 14px;">.</span>FieldValue
<span class="token keyword" style="color: #f38ba3; font-size: 14px;">export</span> <span class="token keyword" style="color: #f38ba3; font-size: 14px;">default</span> <span class="token keyword" style="color: #f38ba3; font-size: 14px;">async</span> <span class="token keyword" style="color: #f38ba3; font-size: 14px;">function</span> <span class="token function" style="color: #9d7dce; font-size: 14px;">updateLessonComplete</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">(</span><span class="token parameter" style="color: #f38ba3; font-size: 14px;">req<span class="token punctuation" style="color: #231F20; font-size: 14px;">,</span> res</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">)</span> <span class="token punctuation" style="color: #231F20; font-size: 14px;">{</span>
<span class="token keyword" style="color: #f38ba3; font-size: 14px;">try</span> <span class="token punctuation" style="color: #231F20; font-size: 14px;">{</span>
<span class="token keyword" style="color: #f38ba3; font-size: 14px;">const</span> <span class="token punctuation" style="color: #231F20; font-size: 14px;">{</span> lessonId<span class="token punctuation" style="color: #231F20; font-size: 14px;">,</span> completed <span class="token punctuation" style="color: #231F20; font-size: 14px;">}</span> <span class="token operator" style="color: #12b5e5; font-size: 14px;">=</span> req<span class="token punctuation" style="color: #231F20; font-size: 14px;">.</span>body
<span class="token keyword" style="color: #f38ba3; font-size: 14px;">if</span> <span class="token punctuation" style="color: #231F20; font-size: 14px;">(</span><span class="token operator" style="color: #12b5e5; font-size: 14px;">!</span>lessonId<span class="token punctuation" style="color: #231F20; font-size: 14px;">)</span> <span class="token punctuation" style="color: #231F20; font-size: 14px;">{</span>
<span class="token keyword" style="color: #f38ba3; font-size: 14px;">throw</span> <span class="token keyword" style="color: #f38ba3; font-size: 14px;">new</span> <span class="token class-name" style="color: #12b5e5; font-size: 14px;">Error</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">(</span><span class="token string" style="color: #f99157; font-size: 14px;">"lessonId is a required parameter"</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">)</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">;</span>
<span class="token punctuation" style="color: #231F20; font-size: 14px;">}</span>
<span class="token keyword" style="color: #f38ba3; font-size: 14px;">if</span> <span class="token punctuation" style="color: #231F20; font-size: 14px;">(</span><span class="token operator" style="color: #12b5e5; font-size: 14px;">!</span>completed<span class="token punctuation" style="color: #231F20; font-size: 14px;">)</span> <span class="token punctuation" style="color: #231F20; font-size: 14px;">{</span>
<span class="token keyword" style="color: #f38ba3; font-size: 14px;">throw</span> <span class="token keyword" style="color: #f38ba3; font-size: 14px;">new</span> <span class="token class-name" style="color: #12b5e5; font-size: 14px;">Error</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">(</span><span class="token string" style="color: #f99157; font-size: 14px;">"completed is a required parameter"</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">)</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">;</span>
<span class="token punctuation" style="color: #231F20; font-size: 14px;">}</span>
<span class="token keyword" style="color: #f38ba3; font-size: 14px;">const</span> claims <span class="token operator" style="color: #12b5e5; font-size: 14px;">=</span> <span class="token keyword" style="color: #f38ba3; font-size: 14px;">await</span> <span class="token function" style="color: #9d7dce; font-size: 14px;">getUserClaimsFromCookie</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">(</span>req<span class="token punctuation" style="color: #231F20; font-size: 14px;">,</span> res<span class="token punctuation" style="color: #231F20; font-size: 14px;">)</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">;</span>
<span class="token keyword" style="color: #f38ba3; font-size: 14px;">if</span> <span class="token punctuation" style="color: #231F20; font-size: 14px;">(</span><span class="token operator" style="color: #12b5e5; font-size: 14px;">!</span>claims<span class="token punctuation" style="color: #231F20; font-size: 14px;">)</span> <span class="token punctuation" style="color: #231F20; font-size: 14px;">{</span>
<span class="token keyword" style="color: #f38ba3; font-size: 14px;">throw</span> <span class="token keyword" style="color: #f38ba3; font-size: 14px;">new</span> <span class="token class-name" style="color: #12b5e5; font-size: 14px;">Error</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">(</span><span class="token string" style="color: #f99157; font-size: 14px;">'user must be logged in'</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">)</span>
<span class="token punctuation" style="color: #231F20; font-size: 14px;">}</span>
<span class="token keyword" style="color: #f38ba3; font-size: 14px;">await</span> db<span class="token punctuation" style="color: #231F20; font-size: 14px;">.</span><span class="token function" style="color: #9d7dce; font-size: 14px;">collection</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">(</span><span class="token string" style="color: #f99157; font-size: 14px;">'lessons'</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">)</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">.</span><span class="token function" style="color: #9d7dce; font-size: 14px;">doc</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">(</span>lessonId<span class="token punctuation" style="color: #231F20; font-size: 14px;">)</span>
<span class="token punctuation" style="color: #231F20; font-size: 14px;">.</span><span class="token function" style="color: #9d7dce; font-size: 14px;">update</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">(</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">{</span>
<span class="token literal-property property" style="color: #12b5e5; font-size: 14px;">completed</span><span class="token operator" style="color: #12b5e5; font-size: 14px;">:</span> completed <span class="token operator" style="color: #12b5e5; font-size: 14px;">===</span> <span class="token boolean" style="color: #9d7dce; font-size: 14px;">true</span>
<span class="token operator" style="color: #12b5e5; font-size: 14px;">?</span> <span class="token function" style="color: #9d7dce; font-size: 14px;">arrayUnion</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">(</span>claims<span class="token punctuation" style="color: #231F20; font-size: 14px;">.</span>uid<span class="token punctuation" style="color: #231F20; font-size: 14px;">)</span>
<span class="token operator" style="color: #12b5e5; font-size: 14px;">:</span> <span class="token function" style="color: #9d7dce; font-size: 14px;">arrayRemove</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">(</span>claims<span class="token punctuation" style="color: #231F20; font-size: 14px;">.</span>uid<span class="token punctuation" style="color: #231F20; font-size: 14px;">)</span>
<span class="token punctuation" style="color: #231F20; font-size: 14px;">}</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">)</span>
res<span class="token punctuation" style="color: #231F20; font-size: 14px;">.</span><span class="token function" style="color: #9d7dce; font-size: 14px;">send</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">(</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">{</span> <span class="token literal-property property" style="color: #12b5e5; font-size: 14px;">status</span><span class="token operator" style="color: #12b5e5; font-size: 14px;">:</span> <span class="token string" style="color: #f99157; font-size: 14px;">"success"</span> <span class="token punctuation" style="color: #231F20; font-size: 14px;">}</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">)</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">;</span>
<span class="token punctuation" style="color: #231F20; font-size: 14px;">}</span> <span class="token keyword" style="color: #f38ba3; font-size: 14px;">catch</span> <span class="token punctuation" style="color: #231F20; font-size: 14px;">(</span>e<span class="token punctuation" style="color: #231F20; font-size: 14px;">)</span> <span class="token punctuation" style="color: #231F20; font-size: 14px;">{</span>
res<span class="token punctuation" style="color: #231F20; font-size: 14px;">.</span><span class="token function" style="color: #9d7dce; font-size: 14px;">status</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">(</span><span class="token number" style="color: #fcba28; font-size: 14px;">400</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">)</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">;</span>
res<span class="token punctuation" style="color: #231F20; font-size: 14px;">.</span><span class="token function" style="color: #9d7dce; font-size: 14px;">send</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">(</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">{</span> <span class="token literal-property property" style="color: #12b5e5; font-size: 14px;">error</span><span class="token operator" style="color: #12b5e5; font-size: 14px;">:</span> <span class="token punctuation" style="color: #231F20; font-size: 14px;">{</span> <span class="token literal-property property" style="color: #12b5e5; font-size: 14px;">message</span><span class="token operator" style="color: #12b5e5; font-size: 14px;">:</span> e<span class="token punctuation" style="color: #231F20; font-size: 14px;">.</span>message <span class="token punctuation" style="color: #231F20; font-size: 14px;">}</span> <span class="token punctuation" style="color: #231F20; font-size: 14px;">}</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">)</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">;</span>
<span class="token punctuation" style="color: #231F20; font-size: 14px;">}</span>
<span class="token punctuation" style="color: #231F20; font-size: 14px;">}</span>
</code></pre>
<hr style="border: 0; border-bottom: 5px solid; border-color: #f5f5f5; margin-bottom: 100px; margin-top: 100px;">
<div style="text-align:center;margin-bottom:36px">
<img width="110" src="https://bytes.dev/images/content/cool-bits.png" alt="Cool Bits logo" style="max-width: 100%;"><h2 style="font-family: Paytone One, sans-serif; font-size: 28px; margin-top: 10px; text-transform: uppercase;">Cool Bits</h2>
</div>
<ol>
<li>
<p style="font-family: Outfit, sans-serif; font-size: 17px; line-height: 1.5;">shadcn (the Satoshi of web dev) just launched <a href="https://click.kit-mail6.com/n4ugqg6788hvhxe69wmc6h68xz5ggflho53w/dphehmue5plvg4am/aHR0cHM6Ly91aS5zaGFkY24uY29tLw==" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1814422297">shadcn/create</a> – which lets you build your own shadcn/ui by picking your own component library, icons, base color, fonts, etc, so you can “build something that doesn’t look like everything else.”</p>
</li>
<li>
<p style="font-family: Outfit, sans-serif; font-size: 17px; line-height: 1.5;"><a href="https://click.kit-mail6.com/n4ugqg6788hvhxe69wmc6h68xz5ggflho53w/e0hph0u74r86glt8/aHR0cHM6Ly9mYW5kZi5jby80b0RKOE5Y" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1814422298">MongoDB Skill Badges</a> are free, focused courses and credentials that help you quickly learn and validate specific MongoDB skills – like Advanced Schema Design Patterns, CRUD Operations, Networking Security, and more. [sponsored]</p>
</li>
<li>
<p style="font-family: Outfit, sans-serif; font-size: 17px; line-height: 1.5;">Former React team member, Christoph Nakazawa just released <a href="https://click.kit-mail6.com/n4ugqg6788hvhxe69wmc6h68xz5ggflho53w/7qh7h2u9znrq78fz/aHR0cHM6Ly9naXRodWIuY29tL25renctdGVjaC9mYXRl" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1814422299">fate</a> – a modern data client for React and tRPC that’s inspired by Relay and GraphQL and will finally solve all of your data fetching problems forever. Probably.</p>
</li>
<li>
<p style="font-family: Outfit, sans-serif; font-size: 17px; line-height: 1.5;">Christian Ekrem wrote about <a href="https://click.kit-mail6.com/n4ugqg6788hvhxe69wmc6h68xz5ggflho53w/owhkhwuwoq2pvlsv/aHR0cHM6Ly9jZWtyZW0uZ2l0aHViLmlvL3Bvc3RzL3RhaWx3aW5kLXRhcmdldGluZy1jaGlsZC1lbGVtZW50cy8=" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1814422300">targeting child elements in Tailwind CSS</a>. The last time I “targeted a child” was with my water balloon launcher when I found those kids TP’ing my house on Halloween, so my expectations are high.</p>
</li>
<li>
<p style="font-family: Outfit, sans-serif; font-size: 17px; line-height: 1.5;"><a href="https://click.kit-mail6.com/n4ugqg6788hvhxe69wmc6h68xz5ggflho53w/z2hgh7uewlqnv8ip/aHR0cHM6Ly9kZW5vLmNvbS9ibG9nL3YyLjY=" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1814422301">Deno 2.6</a> now lets you run package binaries with a new tool called <code style="font-size: 14px;">dx</code>, which is basically the Deno-rific version of <code style="font-size: 14px;">npx</code>.</p>
</li>
<li>
<p style="font-family: Outfit, sans-serif; font-size: 17px; line-height: 1.5;">Frederik Braun explained <a href="https://click.kit-mail6.com/n4ugqg6788hvhxe69wmc6h68xz5ggflho53w/p8hehqu4xqnm07tq/aHR0cHM6Ly9mcmVkZXJpa2JyYXVuLmRlL3doeS1zZXRodG1sLmh0bWw=" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1814422302">why the Sanitizer API is just <code style="font-size: 14px;">setHTML()</code> with better branding</a>.</p>
</li>
<li>
<p style="font-family: Outfit, sans-serif; font-size: 17px; line-height: 1.5;">Jeff Escalante wrote <a href="https://click.kit-mail6.com/n4ugqg6788hvhxe69wmc6h68xz5ggflho53w/x0hph3ue3q5o6nt5/aHR0cHM6Ly9nby5jbGVyay5jb20vS3FCa3MzYQ==" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1814422303">The Complete Guide to embeddable UIs for user management in 2025</a> on the Clerk blog. It clocks in at almost 8,000 words and compares every single possible solution – so yeah, very complete. [sponsored]</p>
</li>
<li>
<p style="font-family: Outfit, sans-serif; font-size: 17px; line-height: 1.5;"><a href="https://click.kit-mail6.com/n4ugqg6788hvhxe69wmc6h68xz5ggflho53w/6qhehoulo9mzg7bo/aHR0cHM6Ly94LmNvbS9NaVR5cGVTY3JpcHQvc3RhdHVzLzE5OTg5NjE1MTkyMDg1OTU5MzM=" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1814422304">TypeSlayer</a> is a TypeScript performance benchmarking and visualization tool that looks really useful for large TS codebases – but it features a disturbing lack of <em>Raining Blood</em>.</p>
</li>
<li>
<p style="font-family: Outfit, sans-serif; font-size: 17px; line-height: 1.5;">Simon Willison wrote about <a href="https://click.kit-mail6.com/n4ugqg6788hvhxe69wmc6h68xz5ggflho53w/kkhmh2unmxkrqnhl/aHR0cHM6Ly9zaW1vbndpbGxpc29uLm5ldC8yMDI1L0RlYy8xMC9odG1sLXRvb2xzLw==" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1814422305">useful patterns for building HTML tools</a>. Just be careful because some of these sound suspiciously close to being gateway drugs for htmx.</p>
</li>
<li>
<p style="font-family: Outfit, sans-serif; font-size: 17px; line-height: 1.5;">Does your startup want to build on Convex’s type-safe, reactive database <em>for free?</em> Apply for <a href="https://click.kit-mail6.com/n4ugqg6788hvhxe69wmc6h68xz5ggflho53w/58hvh8ug76rq8ks6/aHR0cHM6Ly93d3cuY29udmV4LmRldi9zdGFydHVwcw==" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1814422306">Convex for Startups</a> and see why dozens of YC companies have already done it. [sponsored]</p>
</li>
<li>
<p style="font-family: Outfit, sans-serif; font-size: 17px; line-height: 1.5;">Thiery Michel argues that <a href="https://click.kit-mail6.com/n4ugqg6788hvhxe69wmc6h68xz5ggflho53w/25h2h9u3dmk6zdc3/aHR0cHM6Ly9tYXJtZWxhYi5jb20vYmxvZy8yMDI1LzEyLzA0L3R5cGVzY3JpcHQtdHlwZS1hcy1hLXByb2dyYW1taW5nLWxhbmd1YWdlLmh0bWw=" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1814422307">TypeScript type system is its own programming language</a>.</p>
</li>
<li>
<p style="font-family: Outfit, sans-serif; font-size: 17px; line-height: 1.5;">Someone got Gemini to generate/predict what the <a href="https://click.kit-mail6.com/n4ugqg6788hvhxe69wmc6h68xz5ggflho53w/qvh8h8udnk9z5qtl/aHR0cHM6Ly9kb3NheWdvLXN0dWRpby5naXRodWIuaW8vaG4tZnJvbnQtcGFnZS0yMDM1L25ld3M=" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1814422308">front page of Hacker News would look like in 2035</a>. Disturbingly accurate, but the overall tone wasn’t <em>quite</em> condescending enough.</p>
</li>
</ol>
<hr style="border: 0; border-bottom: 5px solid; border-color: #f5f5f5; margin-bottom: 100px; margin-top: 100px;">
<div style="text-align:center;margin-bottom:36px">
<img width="110" src="https://bytes.dev/images/content/spot-the-bug.png" alt="Spot the Bug logo" style="max-width: 100%;"><h2 style="font-family: Paytone One, sans-serif; font-size: 28px; margin-top: 10px; text-transform: uppercase;">Spot the Bug: Solution</h2>
<div class="section-presenter" style="margin-bottom:50px;margin-top:15px"><h4 style="font-size: 19px; margin-bottom: 0; padding-left: 24px; padding-right: 24px;">Sponsored by <a href="https://click.kit-mail6.com/n4ugqg6788hvhxe69wmc6h68xz5ggflho53w/m2h7h6u3e4dvpkfm/aHR0cHM6Ly9ibG9nLnNlbnRyeS5pby9maXgtbi1wbHVzLW9uZS1kYXRhYmFzZS1pc3N1ZXMtd2l0aC1zZW50cnktc2Vlci8_dXRtX2NhbXBhaWduPXNlZXItZnkyNnE0LWV2ZXJncmVlbiZ1dG1fY29udGVudD1uZXdzbGV0dGVyLW4xLXF1ZXJ5LWJsb2ctbGVhcm5tb3JlJnV0bV9tZWRpdW09cGFpZC1jb21tdW5pdHkmdXRtX3NvdXJjZT1ieXRlcw==" style="color: #12b5e5; font-weight: 600; text-decoration: underline;" url-id="1814422296">Sentry</a>
</h4></div>
</div>
<p style="font-family: Outfit, sans-serif; font-size: 17px; line-height: 1.5; padding-left: 24px; padding-right: 24px;">There’s a lot of misdirection here. The bug happens with our <code style="font-size: 14px;">if (!completed)</code> check. <code style="font-size: 14px;">completed</code> is a boolean, meaning when <code style="font-size: 14px;">completed</code> is <code style="font-size: 14px;">false</code> (making it falsy), our code will throw an error. Instead, we can check if <code style="font-size: 14px;">completed</code> is of type <code style="font-size: 14px;">boolean</code>, not if it’s falsy.</p>
<pre class="language-js" style="background-color: #f9f9f9; border: 1px solid #f9f9f9; border-radius: 8px; color: #231F20; overflow: auto; padding: 24px;"><code class="language-js" style="font-size: 14px;"><span class="token keyword" style="color: #f38ba3; font-size: 14px;">if</span> <span class="token punctuation" style="color: #231F20; font-size: 14px;">(</span><span class="token keyword" style="color: #f38ba3; font-size: 14px;">typeof</span> completed <span class="token operator" style="color: #12b5e5; font-size: 14px;">!==</span> <span class="token string" style="color: #f99157; font-size: 14px;">'boolean'</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">)</span> <span class="token punctuation" style="color: #231F20; font-size: 14px;">{</span>
<span class="token keyword" style="color: #f38ba3; font-size: 14px;">throw</span> <span class="token keyword" style="color: #f38ba3; font-size: 14px;">new</span> <span class="token class-name" style="color: #12b5e5; font-size: 14px;">Error</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">(</span><span class="token string" style="color: #f99157; font-size: 14px;">"completed is a required parameter"</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">)</span><span class="token punctuation" style="color: #231F20; font-size: 14px;">;</span>
<span class="token punctuation" style="color: #231F20; font-size: 14px;">}</span>
</code></pre>
<div style="text-align:center;padding-bottom:80px;padding-top:80px">
<div class="bg-alt" style="background-color: #f5f5f5; border-radius: 16px; margin-bottom: 40px; padding: 24px;"><div style="margin-top:-40px">
<img src="https://bytes.dev/images/bytes-icon.png" alt="Bytes" width="55px" style="max-width: 100%; width: 55px;"><h5 style="font-size:18px;font-weight:400;margin-bottom:24px">Want us to say nice things <br> about your company?</h5>
<div style="margin-bottom:16px"><a style="background-color: #FCBA28; border: 1px solid #231F20; border-radius: 100px; color: #231F20; font-size: 14px; font-weight: 600; padding: 8px 14px; text-decoration: none;" href="https://click.kit-mail6.com/n4ugqg6788hvhxe69wmc6h68xz5ggflho53w/g3hnhwumpq4r5gfr/aHR0cHM6Ly9ieXRlcy5kZXYvYWR2ZXJ0aXNl" url-id="1814422309">Sponsor Bytes</a></div>
<div style="margin-bottom:20px"><a style="color: #FCBA28; font-size: 14px; font-weight: 600; text-decoration: underline;" href="https://click.kit-mail6.com/n4ugqg6788hvhxe69wmc6h68xz5ggflho53w/9qhzhdud95o0m0s9/aHR0cHM6Ly9ieXRlcy5kZXYvc2hhcmU=" url-id="1814422310">or share it</a></div>
<p style="font-family: Outfit, sans-serif; font-size: 14px; line-height: 1.5; padding-left: 24px; padding-right: 24px;">Built with ❤️ by<!-- --> <a style="color: #ed203d; font-weight: 600; text-decoration: underline;" href="https://click.kit-mail6.com/n4ugqg6788hvhxe69wmc6h68xz5ggflho53w/3ohphdu3zpe0lmhr/aHR0cHM6Ly91aS5kZXY=" url-id="1814422311">ui.dev</a></p>
</div></div>
<p style="font-family: Outfit, sans-serif; font-size: 14px; line-height: 1.5; opacity: 0.5; padding-left: 24px; padding-right: 24px;">50 W Broadway Ste 333 PMB 51647 Salt Lake City, Utah 84101</p>
<div style="font-family:Papyrus, cursive"><a class="unsubscribe-link" href="https://click.kit-mail6.com/n4ugqg6788hvhxe69wmc6h68xz5ggflho53w/n2hohquvr7zmp0s6/aHR0cHM6Ly9ieXRlcy5kZXYvdW5zdWJzY3JpYmU=" style="color: #9B9890;" url-id="1814422312">Unsubscribe from Bytes</a></div>
</div>
</div></td>
<td style="border-collapse: collapse !important; word-break: normal;"></td>
</tr></tbody></table>
<span style="display: none"><a href="https://unsubscribe.kit-mail6.com/n4ugqg6788hvhxe69wmc6h68xz5ggflho53w">Unsubscribe</a></span>
<!-- -->
<img src="https://open.kit-mail6.com/n4ugqg6788hvhxe69wmc6h68xz5ggflho53w" alt="">
</body>
</html>