08-30-2024

How to properly use third-party libraries with React Server Components

React Server Components is that one paradigm people love but still need the coaching on how wield effectively. As with any new technology patterns will continue to emerge that aim to ease development.

When you have third-party libraries the line gets a bit blurrier because you’re not able to define granular server/client boundaries. This results in people just putting the use client compiler directive around the entire page or manually writing pass through components. Martin’s brief article gives examples on how to combat the problem with the tools given.

https://www.martin-paucot.fr/blog/how-to-properly-use-third-parties-libraries-with-react-server-components-5ep8

Paragraphs

Scott O’Hara is quickly becoming one of my favorite authors in the web space. His knowledge of the HTML spec and arduousness in testing assumptions gives him a unique voice in the community.

In this article Scott details what makes a paragraph, how both HTML parsers and accessibility tools treat blocks of text. I always try to push the developers around me to write more descriptive markup, and Scott’s articles help me determine when to push and in which direction.

https://www.scottohara.me/blog/2024/08/29/paragraphs.html

Zig Tokenizer

Continuing my adventure into compilers and systems programming I wanted an article that explains how to write a tokenizer. The “why” here aside from the quest for knowledge I believe all of us should embark on is because I read an article many moons ago on writing an efficient HTML tokenizer.

Two things to note:

  1. the article in question went mostly over my head
  2. the article was later lost to me because deleting the tab group in Safari apparently also deletes the “Tab Group Favorites” entry forever so goodbye Library of Alexandria I should’ve protected you from Caesar (me).

Anyway my enormous sense of loss aside you should read this if you too would like to learn more about what it takes to tokenize a stream of text. The example in particular being a programming language. Maybe you want to write your own compiler one day, who knows!

https://mitchellh.com/zig/tokenizer

Grokking V8 closures for fun (and profit?)

As a followup to last month’s article by Jake Archibald, we dive deeper into Javascript Closures and specifically how they work in V8. If you write Javascript then you know closures are one of those language attributes that once they click you feel like a tech tree in Civilization was just unlocked.

If you want to learn more about closures at a deeply technical level give this article a read. I’d argue you do want to learn more about this because everyone ignores learning about Javascript engines until they run into a particular issue concerning them. The web varies in implementations, and some knowledge of what is happening under the hood always helps the painstaking debugging process.

Expect some cool diagrams, tons of example code, and even some blocks of Assembly!

https://mrale.ph/blog/2012/09/23/grokking-v8-closures-for-fun.html