📜 Do not pass DTOs to UI components - @dario_djuric
Greatly explains why you'd rather design props independently of what the backend sends you returns
https://t.co/i6jU8fy1kp
Introducing `claude-sonnet-to-gpt-4o-mini` ✍️
Get the quality of Claude 3.5 Sonnet, at a fraction of the cost and latency.
Give one example of your task, and Sonnet will teach 4o-mini (20x cheaper!!) how to do the task perfectly.
And it's open-source: https://t.co/QTt9jSiqVB
📜 Simplify Component Imports with TypeScript Namespaces
Last week's newsletter's top link is @sergiodxa article, with around 1200 clicks.
Readers usually like pragmatic articles like this
https://t.co/9MtSIGuPlH
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.
Chrome Dev Tools 💡
You may not know that we can override response headers in Chrome Dev Tools 🤩
This can be very handy for handling CORS errors locally until they get fixed from the API server ✅👇
— HTML
Vous voulez soumettre un formulaire avec un bouton en dehors de la balise <form> ?
Et bien c'est possible nativement.
Vous pouvez ajouter l'attribut "form" à votre bouton d'envoi pour associer l'action à un formulaire spécifique n'importe où sur la page ! 🙌
📚 https://t.co/XofDSqKCKB
"What is the point of server components if all my pages need client features like hooks or event handlers?"
You don't need to turn the entire page into a client component
Welcome FlyDrive to the AdonisJS package family!
It is a file storage framework-agnostic library for Node.js. It provides a unified API to interact with the local file system and cloud storage solutions like S3, R2, and GCS.
🔗 https://t.co/ouXVi0Y73j
TypeScript problem: You need to support any string value, but you’d like autocomplete support for common values.
Solution: Create a union with "string & {}" on the end.
Now you get autocomplete support for all values listed in the union, but can still enter any value.