Bytes.dev - Bytes: Two words: React fatigue

Bytes banner (Turn on images šŸ˜˜)

This week, weā€™ve got blessings from the platform, math being a very cool thing, and yet another existential crisis.

Welcome to #101.


Dog as a gift meme

The Chrome team presenting new platform features

Google I/O Goodies

While yā€™all were busy watching the Johnny Deppā€“Amber Heard trial (sickos), ā€œOne take Jakeā€ and the rest of the Google team just wrapped up another I/O. This year they were able to (mostly) avoid getting our hopes up, and then crushing us with the inevitable ā€œitā€™s available behind a flag šŸ„²,ā€ thanks to the Interop initiative (which might be the biggest thing no one is talking about).

TLDR: Browser vendors set aside their differences back in 2019 to start working together on fixing deficiencies in the web platform. So far, itā€™s resulted in an explosion of new features and fixes that are supported across all major browsers. It turns out, Google DevRels have been listening to your subtweets feedback after all.

Letā€™s break down some of these cool, new, (mostly) non-flagged features from I/O 2022.

HTML & CSS:

  • Dialog element lets you create accessible modals that work with forms out of the box. Noice.
  • You can now style checkboxes, radios, and more with accent-color
  • Container queries ā€“ theyā€™re like media queries but for container elements (still needs a polyfill, but otherwise huge W)
  • :has and :is selectors ā€“ so useful (go look them up)

JavaScript:

  • Top level await (no more async function closures) ā€“ LFG!
  • Private class methods for all you class-loving heathens
  • Accessing the last item in an array got easier with arr.at(-1) (also works for strings)
  • New utilities like structuredClone & createImageBitmap

Things we canā€™t have yet, but have been promised:

  • The navigation and page transition APIs
  • Select Menus that we can style šŸ™ (weā€™ve only been waiting our whole lives)
  • CSS anchor positioning (will save appx. 1 million lines of JS in every app)

Bottom Line: If the goal of I/O was to get us hyped about the future of the web platform, mission accomplished. The only thing missing was a Google Devrel version of (Tech) Celebrities Read Mean Tweets. Thereā€™s always next year.


Skeleton admiring some silk

"You set this up in 5 minutes? Incredible." [sponsored]

FusionAuth made my job fun again

I got into this industry for one reason ā€“ my burning passion for building complex authentication solutions.

Ok, thatā€™s a lie.

Call me old fashioned, but Iā€™m just a little more interested in building features that users *actually* care about ā€“ instead of worrying about crap like SSO, MFA, user management, and all the security headaches that come along for the ride.

Thatā€™s why weā€™re huge fans of FusionAuth.

They handle all of the messy auth and security stuff for you, and make it super easy to integrate with your app in 5 minutes or less (no matter how weird your tech stack is).

Theyā€™re also way more flexible than most other auth tools ā€“ you can deploy anywhere, you can self-host, and you can easily customize whatever you want with their straightforward APIs and webhooks.

Check it out ā€“ and never worry about hand rolling auth again.


Kermit on acid

Whatā€™s behind the Solid.js hype?

If youā€™ve spent any time on tech Twitter recently, youā€™ve probably noticed two things:

  1. Thereā€™s been a lot of love for Solid.js over the past few weeks
  2. Your level of happiness is perfectly inversely correlated with the amount of time you spend on tech Twitter

But since we all know that coRreLaTioN != cAuSaTiOn, letā€™s ignore point #2 and dive into the hype behind Solid.js ā€“ or as its friends like to call it, ā€œReact: the good parts.ā€

Just like React, you build Solid apps with components, which (for both frameworks) refers to JavaScript functions that return JSX. Solid also borrowed a bunch of other React features like SSR & Hydration, Concurrent Rendering, Context, and more.

But unlike React, thereā€™s no Virtual DOM and no Hooks rules. Instead, Solid uses a compiler (similar to Svelte) that converts your JSX into vanilla JS. This makes Solid a lot simpler than modern React and a lot faster.

But Solidā€™s been around for a while (2018-ish). So why are we hearing so much about it now?

Two words: React fatigue.

Itā€™s no secret that even die-hard React fans are starting to get a little disillusioned by the growing complexity around Hooks. So itā€™s probably no coincidence that we started hearing lots of great things about Solidā€™s simplicity right after the React team posted an RFC for a new hook, useEvent, which receivedā€¦ mixed reviews. (Yes, I am still aware that coRreLaTioN != cAuSaTiOn, thanks for checking.)

Bottom Line: This is definitely still the honeymoon phase for Solid (they just released v1.4). And itā€™s easier for a framework like Solid to preach the virtues of speed and simplicity from the earlier stages of the development and adoption lifecycle, than it is for a more mature and popular framework like React.

That said, Solid does look awesome. It combines the best parts of two beloved frameworks (React and Svelte) to make a new framework thatā€™s simple, fast, and powerful. And we can always appreciate a good mash-up.


šŸ”¬ Spot the (TypeScript) Bug ā€“ Sponsored by Courier

This livestream shows you how to add Slack as a transactional notification channel with Courierā€™s super simple API.

function addTriple(inputs: number[]): number {
  return inputs[0] + inputs[1] + inputs[2];
}

Cool Bits

  1. Speaking of Solid.js, Ryan Carniato (Solidā€™s creator) just announced that heā€™s leaving his job at eBay and joining Vercel Netlify! The funding OSS by tricking VCs into investing in hosting providers trojan horse is alive and well!

  2. Chromatic lets you automate all your workflows for Storybook ā€“ gathering UI feedback, visual testing, and documentation ā€“ so you can iterate faster with a lot less manual work. [sponsored]

  3. Jay Hoffman wrote about the history of the web apps vs. web sites debate. Is there really a difference between them? Does it matter? Does anything? Does my life have meaning? Read to find out.

  4. Flutter v3 was released at Google I/O with stable support for Linux and MacOS. Thatā€™s cool, but donā€™t call yourself a true ā€œcross-platform frameworkā€ until you start supporting Palm OS.

  5. Malte Ubl (Chief Architect at Vercel) wrote more than you ever wanted to know about font loading on the web. Itā€™s a lot like when Shaq told us more than we ever wanted to know about his crush on Tom Brady.

  6. Mithril.js just released its first new version in three years. Donā€™t call it a comeback.

  7. Fastly just acquired Glitch. We didnā€™t read the whole press release, but it did talk about ā€œthe edgeā€ a lot, so I guess it sounds promising?

  8. Math expressions can now be rendered in Markdown on GitHub. Because Math is a wonderful thing. Math is a really cool thing. So get off your 'ath letā€™s do some Math. Math, math, math, math, math.


šŸ”¬ Spot the (TypeScript) Bug Solution ā€“ Sponsored by Courier

function addTriple(inputs: number[]): number {
  return inputs[0] + inputs[1] + inputs[2];
}

TypeScript will warn us if we pass anything but an array of numbers to that function, but if the array has less than 3 items in it, the third item will be undefined and our function will return NaN. TypeScript canā€™t know how many items are in the array, so it canā€™t warn us.

There are many solutions to this. One would have us change our type signature to be a tuple type instead of an array. TypeScript can then warn us if our array doesnā€™t have enough options.

function addTriple(inputs: [number, number, number]): number {
  return inputs[0] + inputs[1] + inputs[2];
}

Another option is to enable the noUncheckedIndexedAccess TypeScript compiler option, which will force us to check that each item isnā€™t undefined.

function addTriple(inputs: number[]): number {
  if (
    inputs[0] === undefined ||
    inputs[1] === undefined ||
    inputs[2] === undefined
  ) {
    throw new Error("Invalid input");
  }

  return inputs[0] + inputs[1] + inputs[2];
}

Share Bytes

ui.dev banner
Ā 

We work hard to make Bytes something you'd want to share with your developer friends. And to make it a little easier, we'll give you free stuff when you do.

20

Your bits

Your Referral Page

Your shareable link

https://bytes.dev?x=1697807915
Ā 

Have a product you think our developers will love?
Advertise in Bytes

youtube icon youtube icon twitter icon instagram icon

50 W Broadway Ste 333 PMB 51647 Salt Lake City, Utah 84101

Unsubscribe from Bytes

Older messages

Bytes: 10 things we learned turning 100

Monday, May 16, 2022

🎉 Welcome to issue 100 🎉 We were planning on doing an awesome giveaway, but after looking at $NET this morning, it'll have to wait until issue #200. Let's rage 10 things we learned turning 100

Bytes: Why Web Components Lost

Monday, May 9, 2022

This week, we've got React hook turtles all the way down, Jörmungandr trying to take down JavaScript, and a surefire way to get on Linus Torvalds' good side. Welcome to #99. React hooks are

Bytes: making FTP cool again

Tuesday, May 3, 2022

“WTF is this?” First off, watch your language. The RWD Weekly newsletter (of which you were subscribed) has merged with Bytes (this newsletter) to bring you our educational, yet delightful dose of

Bytes: The Edge is just a spicy CDN

Tuesday, May 3, 2022

This week, we're experimenting with our runtime features, learning about The Edge™️, and (hopefully) avoiding accidental tax fraud. Welcome to #97. Some experiments pay off Node gets experimental

You Might Also Like

Youre Overthinking It

Wednesday, January 15, 2025

Top Tech Content sent at Noon! Boost Your Article on HackerNoon for $159.99! Read this email in your browser How are you, @newsletterest1? 🪐 What's happening in tech today, January 15, 2025? The

eBook: Software Supply Chain Security for Dummies

Wednesday, January 15, 2025

Free access to this go-to-guide for invaluable insights and practical advice to secure your software supply chain. The Hacker News Software Supply Chain Security for Dummies There is no longer doubt

The 5 biggest AI prompting mistakes

Wednesday, January 15, 2025

✨ Better Pixel photos; How to quit Meta; The next TikTok? -- ZDNET ZDNET Tech Today - US January 15, 2025 ai-prompting-mistakes The five biggest mistakes people make when prompting an AI Ready to

An interactive tour of Go 1.24

Wednesday, January 15, 2025

Plus generating random art, sending emails, and a variety of gopher images you can use. | #​538 — January 15, 2025 Unsub | Web Version Together with Posthog Go Weekly An Interactive Tour of Go 1.24 — A

Spyglass Dispatch: Bromo Sapiens

Wednesday, January 15, 2025

Masculine Startups • The Fall of Xbox • Meta's Misinformation Off Switch • TikTok's Switch Off The Spyglass Dispatch is a newsletter sent on weekdays featuring links and commentary on timely

The $1.9M client

Wednesday, January 15, 2025

Money matters, but this invisible currency matters more. ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

⚙️ Federal data centers

Wednesday, January 15, 2025

Plus: Britain's AI roadmap ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Post from Syncfusion Blogs on 01/15/2025

Wednesday, January 15, 2025

New blogs from Syncfusion Introducing the New .NET MAUI Bottom Sheet Control By Naveenkumar Sanjeevirayan This blog explains the features of the Bottom Sheet control introduced in the Syncfusion .NET

The Sequence Engineering #469: Llama.cpp is The Framework for High Performce LLM Inference

Wednesday, January 15, 2025

One of the most popular inference framework for LLM apps that care about performance. ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

3 Actively Exploited Zero-Day Flaws Patched in Microsoft's Latest Security Update

Wednesday, January 15, 2025

THN Daily Updates Newsletter cover The Kubernetes Book: Navigate the world of Kubernetes with expertise , Second Edition ($39.99 Value) FREE for a Limited Time Containers transformed how we package and