🚫 𝗔𝘃𝗼𝗶𝗱 Using a full context value in every component can trigger unnecessary re-renders.
✅ 𝗜𝗻𝘀𝘁𝗲𝗮𝗱 Use 𝘤𝘰𝘯𝘵𝘦𝘹𝘵 𝘴𝘦𝘭𝘦𝘤𝘵𝘰𝘳𝘴 to pull only the data you need. This reduces re-renders and improves performance.
attr() is getting an upgrade!
Starting in Chrome 133 (stable rollout happening this month), you'll be able to access attributes in CSS as typed values beyond strings.
Here's an example of where that's pretty cool. Given:
<div data-rating="4.5">
You can use data-rating as a numerical value with:
attr(data-rating type(<number>)
So in this demo, I'm using that value to show a fill percentage in the stars (as a background gradient with a mask). I'm also able to use this value as a string (which was possible before) to represent its content as a string in a pseudo element. Two for one!
extra detail: animate a CSS custom property from 0 to 100 on scroll and use that for a counter()
label::after { content: counter(complete) '% complete'; }
translate the label using container query units ✨
translate: 0 calc(var(--p) * 1cqh);
Use CSS custom properties and the sin() trigonometric function to give each character an eased animation-delay 🤙
.char {
animation-delay: calc(
sin((var(--index) / var(--total)) * 90deg) *
var(--duration)
);
}
React Native Skia uses MakeLazyImageFromTextureSource for video frames. We hacked this into Flutter web Jan 2023, a few days after trying to move to Flutter. Reported our findings in Flutter repo, and opened a ticket about Texture support mentioning this challenge and hoping there might be interest in enabling better video support (issue #119649).
A year and a half later, React Native Web ships a feature that does what we wanted to do in Flutter. Still no official support for this API in Flutter web.
We're excited to have @DrizzleORM as the first ORM to support PGlite 🎉🚀
• Run full Postgres embedded in your app with PGlite.
• At only 2.6mb, it's perfect for local-first apps!
https://t.co/lRA5cLXZ3U
https://t.co/xZj6TJl64x