Have you heard about the latest @Sylius 2.0 beta release? Not yet? Check it out ➡️
https://t.co/bq80n2I5Bb
Among many new features, there's one I'm particularly proud of - @ApiPlatform 4.0 support 😎 We stuck with the 2.x version for way too long! To change that, the Sylius team upgraded to API Platform 3.4. But being hyped by this year's #APIPlatformCon, I thought that was not enough and right away I started pushing to 4.0. Unfortunately, due to other responsibilities, I wasn't able to finish this effort, but here, once again, Michał Pysiak from the Sylius team jumped in and finished my work. That's the spirit of cooperation! 🤩 And thanks to that, we are back in the game with API Platform support 💪
PgHero est un dashboard de performance pour la base de données PostgreSQL qui va vous permettre de suivre vos bases de données et identifier les points de contention s'ils existent ⬇️ via mes amis de @bearstech
https://t.co/6UQAEqKaNI
Your runtime environment variables are not safe.
Just this code in an npm package would leak them to a malicious endpoint.
So, where should you store your secrets?
Turns out I was totally off-base with a post I made last week.
You'll never need to write a `.js` import again, thanks to this new flag in TS 5.7.
The TS team changed their mind. This is massive.
🧵
PSA - if you're running lots of npm scripts on CI, replace them with node --run:
❌ npm run test && npm run lint
✅ node --run test && node --run lint
You'll gain around 200ms for each one replaced.
My cancer is “unmethylated”. Practically speaking this means: chemo resistant. Now that I’ve completed radiation, what’s the next “standard” treatment? You guessed it: chemo. In other words, I’ve already reached the end of normal treatment. (1/4)
A historical day for CSS 😀🎉
If you write any components used and/or styled by others, you know how huge this is!
background: if(style(--variant: success), var(--green));
Even if you don’t, this will allow things like:
padding: if(var(--2xl), 1em, var(--xl) or var(--m), .5em);
GitHub issue: https://t.co/HZ4zHs33bx
This is great CSS 👏
position-try-options: flip-block, flip-inline;
Keywords for if there isn't any room on an axis, flip the position. You can have more control if you want. But more often than not, you want "If it gets cut off at the bottom/right, put it on the top/left"
Use Zod to parse your environment variables once, then use that inference to type process.env throughout your app.
Also, a beautiful example of how you can extend an interface from a VALUE, not a type.
Not one, not two, but THREE of my proposals were accepted in today’s @csswg F2F! 🎉
1. background-clip: border-area; to easily create continuous image (e.g. gradient) borders that are clipped to the border area and follow rounding properly
https://t.co/dIJ5O4NwhL
2. Rounding in polygon() so you can have arbitrary polgons that *actually* look good
https://t.co/Tqzi87J2Ls
3. none values for clamp() when you only need to clamp in one direction
https://t.co/0BTyyKUZ5x
We just added the first Vinxi-powered ssr + streaming example to @Tan_Stack Router!
This is the first step to opening up ~~a can of worms~~ a lot of possibilities around the server, HTTP and possibly even server components.
Stay tuned!
https://t.co/6P0DoYNvZA
The magic trick to mastering the new Next.js is not server components.
It's using server components with interactivity (client components) complementary
When Next 14 came out, I thought everything needs to be server component
Even worse, I thought using 1 client component in the whole tree would opt you into client rendering
Let's quickly define the new terminology:
- Client components: Components that can pre-render on the server but hydrate on the client. That means HTML and Javascript is shipped, whereas the Javascript increases the bundle size
- Server components: Components that completely render on the server, i.e. the conversion from <MyComponent /> to <div>...</div> happens on the server and is streamed to the client. That means 0kb Javascript, just a done HTML file
So, what's the buzz about?
When I switched to Next.js 13, I thought client components are poison. I wasn't even daring to set a global context provider around my app because I thought it might drag my whole app into the slower client component rendering:
That is wrong however. Server components get rendered before client components. That means, since the server component is a child of the client component, the compiled file will look like this at one point:
When that is streamed to the client, almost all the work has been done. The only thing left is to attach the interactivity from <ClientComponent /> (e.g. set an onClick, attach a scroll listener, create a context, access window) as a listener on the user's browser
So yes, you can use Client Components as you wish, just be aware that everything inside of them ships Javascript to the user. For example, with Next.js 14, you can create highly dynamic flows completely on the server 🤯
But, most of the time, you want to mix server and client components. For example, in above snippet, we can't display to the user while the form submits
We can add a client submit button that disabled the button while the form is already submitting:
Suite à l'IETF Prague, revenons sur l'évolution du protocole HTTP, son rôle dans le fonctionnement du web et l’élaboration de 3 standards (Braid, PREP & @MercureRealTime) permettant de recevoir des mises à jour des ressources publiées par les serveurs : https://t.co/I3AtUKkKd2
https://t.co/ZZcJ8VviUc
All code has been letters, on a grid, since the days of the teletype machine. How can we advance the state of the art to make code itself more expressive and powerful? How can we layer more meaning onto code?