Web Weekly #134 (#blogPost)

Guten Tag! Guten Tag! 👋Does the new React compiler fix all the bugs in our code? Should you self-host your custom fonts? And is CSS slowly but surely replacing JS animation libraries…


This content originally appeared on Stefan Judis Web Development and was authored by Stefan Judis

Guten Tag! Guten Tag! 👋

Does the new React compiler fix all the bugs in our code? Should you self-host your custom fonts? And is CSS slowly but surely replacing JS animation libraries?

Turn on the Web Weekly tune and find all the answers below. Enjoy!

Jochem listens to 88-Keys & Kanye West - Stay Up!

One of my favorite tracks, the beat is just so smooth 👌 I can fully recommend The Death of Adam (the album this track comes from) as well!

Do you want to share your favorite song with the Web Weekly community? Hit reply; there are three more songs left in the queue.

What are your tricks for getting into the zone? I don't have any, and I wish I'd be that guy who puts on headphones and gets straight into it. That's just not how I roll, or is it?

I've read Marcus's tips on staying motivated as a solo founder, and he does the following:

Starting with a not-too-easy quick win — sounds reasonable. I might give it a try. Do you have other tricks? I'd love to share a few Web Weekly community tricks next week.

Open tabs

How to always use the correct package manager

I use good old npm, because I can't be bothered by trying another package manager. I also don't think it's terribly slow. But when I jump across projects, there might be one that uses pnpm. What then?

Wouldn't it be great if your command line automatically picked the correct package manager? Node's corepack does this for you.

Mix and match your package managers

A new way to animate height

It's still early for the new calc-size() CSS function, but if you want to know what's cooking... 👇

Use the new and fancy

Should you self-host your fonts?

Oldie but goldie: Barry investigated whether using Google Fonts directly or self-hosting them is better. Fonts can drastically slow down your sites, so it's always good to tweak and monitor their impact closely.

Speed up the web

A look at Chrome's new speculation rules

The new Chromium Speculation Rules API allows you to prerender pages. You can now drop in a script element into your pages and let Chrome/Edge do the magic.

<script type="speculationrules">
{
  "prerender": [{
    "where": {
      "and": [
        { "href_matches": "/*" },
        { "not": {"href_matches": "/wp-admin"}},
        { "not": {"href_matches": "/*\\?*(^|&)add-to-cart=*"}},
        { "not": {"selector_matches": ".do-not-prerender"}},
        { "not": {"selector_matches": "[rel~=nofollow]"}}
      ]
    }
  }]
}
</script>

The Chrome developer blog article is excellent, so you should start there.

After this, Stoyan played around with the new API, and it's a great hands-on.

Prerender pages

You're halfway through!

Wowza! Would you enjoy getting Web Weekly straight to your inbox?

The wonderful weird web – A JavaScript Quine Clock

This is wild. In "only" twelve hours, Martin wrote some JS to render its own source code as a ticking clock. I have no words and don't even know how I would start debugging this.

Watch the time

When should you name your landmarks?

Adrian explains when (and when not) your HTML elements should have an accessible name.

Trust the context

Can CSS do what Framer Motion does?

I love Matt's closing here. 😅👆

But in all seriousness, the post discusses how all the new browser stuff (@​starting-style, view transitions, scroll-driven animations) affects animation JS libraries and when native platform features are good enough.

Great read! 💯

Make things fancy

A look at the new React compiler

You might have heard React now comes with a compiler (or transpiler or "thing that is supposed to solve all the bugs and optimize all the render loops we've put into our React codebases"™).

Nadia took a deep dive to see how/if it works. The summary: It works for simple code, but the real world is messy, and creating silver bullet software is tough.

Automatically optimize your code

A 💙 for Intl

I'm such an Intl fanboy, so it's hard to resist not including it here. If you're still using Moment or date-fns, you might want to check if you can drop some JS code because the browser can do much of the date formatting for you.

Format dates

Random MDN – overflow-wrap

From the unlimited MDN knowledge archive...

Have you used overflow-wrap already? No? Then you should check it out!

Control the overflow

TIL recap – Non-capturing groups

If you're wrangling regular expressions, you might need capture groups (()) to define that you're looking for combinations of different character sequences. But sometimes, you don't need them in your matching result. This situation is when non-capturing groups ((?:)) help.

Tidy up your regular expressions

Find more short web development learnings in my "Today I learned" section.

New on the platform

With Firefox 127 (shipping in 3 days), new JavaScript Set methods are coming to cross-browser town: intersection, union, difference, symmetricDifference, isSubsetOf, isSupersetOf, and isDisjointFrom.

These are some fancy names, but all the methods are documented on MDN if you have questions. And if you want to adopt these methods today, as far as I see, polyfills are available in core-js.

Classifieds & friends

  • HTMLrev is a collection of over a thousand free HTML templates to give your next project a headstart.

Three valuable projects to have a look at

A new Tiny Helper

If you're looking for a new editor font, you'll probably find it here.

Pimp your editor

Find more single-purpose online tools on tiny-helpers.dev.

Thought of the week

Max is a wise man and shared how to adopt new web features step by step in Old Dogs, new CSS Tricks.

Learning new architectural approaches is easier if we take existing patterns and evolve them, rather than start from scratch.

Did you learn something from this issue?

💙 If so, support the newsletter; small donations massively fill up my motivation tank.

This is all, friends!

Loved this email? Hated this email? I want to hear about it! Reply to this email because I want to know more!

And with that, take care of yourself - mentally, physically, and emotionally.

I'll see you next week! 👋


Reply to Stefan


This content originally appeared on Stefan Judis Web Development and was authored by Stefan Judis


Print Share Comment Cite Upload Translate Updates
APA

Stefan Judis | Sciencx (2024-06-08T22:00:00+00:00) Web Weekly #134 (#blogPost). Retrieved from https://www.scien.cx/2024/06/08/web-weekly-134-blogpost/

MLA
" » Web Weekly #134 (#blogPost)." Stefan Judis | Sciencx - Saturday June 8, 2024, https://www.scien.cx/2024/06/08/web-weekly-134-blogpost/
HARVARD
Stefan Judis | Sciencx Saturday June 8, 2024 » Web Weekly #134 (#blogPost)., viewed ,<https://www.scien.cx/2024/06/08/web-weekly-134-blogpost/>
VANCOUVER
Stefan Judis | Sciencx - » Web Weekly #134 (#blogPost). [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/06/08/web-weekly-134-blogpost/
CHICAGO
" » Web Weekly #134 (#blogPost)." Stefan Judis | Sciencx - Accessed . https://www.scien.cx/2024/06/08/web-weekly-134-blogpost/
IEEE
" » Web Weekly #134 (#blogPost)." Stefan Judis | Sciencx [Online]. Available: https://www.scien.cx/2024/06/08/web-weekly-134-blogpost/. [Accessed: ]
rf:citation
» Web Weekly #134 (#blogPost) | Stefan Judis | Sciencx | https://www.scien.cx/2024/06/08/web-weekly-134-blogpost/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.