Using @tailwindcss.com for styling? Here are some not-obvious strategies to make your styles more composable (using v4) 🧱
Sandro Maglione
@sandromaglione.bsky.social
The Coding Explorer 💻・Sharing patterns to build type-safe web & mobile apps・Typescript・Effect・React・XState Helping devs at http://typeonce.dev 🚀
Last release of the year in the newsletter, with a look back at everything that happened in 2024 And it happened a lot 🤯 www.sandromaglione.com/newsletter
✨ TypeScript tip ✨ A function that returns Tagged Classes 👉 Type a class with `new () => T` 👉 Required `Tag` type and value 👉 Return a class with `_tag` Call the function from `extends` to get the class 🪄
My writing 101 tips in this week newsletter I have been writing on the web for (more than) a few years now Exploring my setup and process this week 👇 www.sandromaglione.com/newsletter
The example that made me get CSS subgrid ✨ A superpower that can be used for many layouts www.typeonce.dev/article/the-...
Articles are coming to typeonce.dev 👀 For everything that doesn’t require long explanations, but just short and to-the-point examples 👇
New update on pubdev with package download count 👀 Turns out fpdart is downloaded 90_000 times each week 🙌 (number formatting intended)
✨ TypeScript Tip ✨ Rest parameters: Allow passing any number of arguments to a function Make your API easier to use, avoiding multiple function calls 🤝
✨ TypeScript Tip ✨ Function overloads with types 👉 Wrap type in `{}` 👉 Provide 2 different signatures Allows to call the same function with different parameters, and different results Runtime problems may apply 🙌 This pattern is useful in library-land to provide a better API for the end user
Programming literacy in this week newsletter 💡 > The ability to read, write, and understand code; programming concepts, syntax, and semantics, as well as applying skills to solve problems and communicate ideas sandromaglione.com/newsletter
First-draft thoughts on programming, web, games | Sandro Maglione
Every week I explore the sharp edge of web technologies delivering you unfiltered insights on my discoveries, so you can avoid my same mistakes.
sandromaglione.com
✨ TypeScript Tip ✨ Type classes using `new` 👉 `new` keyword 👉 Constructor parameters inside `()` 👉 Class parameters after `=>` You can mark a type as a constructor signature, something that can be instantiated using `new` 👇
✨ Introducing ECS for TypeScript ✨ typeonce/ecs is a zero dependencies library to bring the Entity Component System pattern in your game Simple, working with any renderer, type safe and composable 🕹️ github.com/typeonce-dev...
GitHub - typeonce-dev/ecs: Entity Component System (ECS) implementation in TypeScript, extensible, working with any renderer, type safe and composable 🕹️
Entity Component System (ECS) implementation in TypeScript, extensible, working with any renderer, type safe and composable 🕹️ - typeonce-dev/ecs
github.com
Systems in ECS just got a simple as it gets 🕹️ Define systems, dependencies, and input all type safe and inferred for you ☑️ Components ☑️ Systems ☑️ Entities Closer to the full API 🔜
ECS + @pixijs.com + MatterJS = 🕹️ Compose systems to build a complex game with physics and rendering ECS keeps everything organized and under control 🫡
Have you ever considered making a game? Well, then you should learn about Entity Component System 🕹️ An introduction for you in this week newsletter 👇 sandromaglione.com/newsletter
Integrate physics with matterjs and ECS in your game 🧱 Each system as simple as it gets, a function and a query is all you need 👇
Making the API as simple and safe in my ECS in TypeScript 🕹️ Define a component with a simple class, auto tagged and ready to use Simple and safe 🪄
Working Entity Component System with TypeScript in action 🕹️ Simple architecture for organised code and powerful results 👇
ECS implementation in TypeScript achieved 🫡 TypeScript only, extensible, working with any renderer, type safe and composable 🕹️ May be the beginning of something #game-development #typescript #games #ecs
Entity Component System (ECS) brings composability to game development 🪄 Split data and logic, and just compose entities with what they need to operate Clean, composable and powerful 🔥
Local-only calories tracker app project out now 🚀 Learn how to build a client-only app with database included in the browser with PGLite 🐘 @effect-ts.bsky.social + @drizzle.team + @tanstack.com router + XState www.typeonce.dev/course/calor...
Local-only calories tracker app | Typeonce
A local-only calories tracker app made with TanStack Router, PGlite, Effect, XState and drizzle. The app is all client-side, fast, private, and reactive using a local postgres database.
typeonce.dev
Functional programming in games? 🤨 I have been exploring a deep hole this week, and I may have found something Some ideas in this week newsletter 👇 www.sandromaglione.com/newsletter
New project landing next week Tuesday 26 November 🚀 Local-only calories tracker app 🏗️ @effect-ts.bsky.social ⚡️ @pglite.dev with live queries 📄 @drizzle.team 🔗 Actors with XState 🧱 @tanstack.com router Your next local-first stack 👇
Upcoming local-only project is going to be an interesting one 🫡 Local database with @effect-ts.bsky.social schemas, migrations, XState state management, @tanstack.com router and more 🪄 Preview link: www.typeonce.dev/course/calor...
Add URL state to this and you have everything that you need 🤝
Component State Management in React: - useState - useMachine That's it. That's all I use anymore.
@tailwindcss.com v4 is out in beta 🚀 I have been using v4 for months now (early alpha) It empowers all my projects 🪄 No more js, configuration CSS only 🫡 Automatic source detection 💯 New custom utilities 🏗️ New custom variants And never came back 👇
New project coming: Local-only calories tracker app A key component of a local-first app is a local data store This is how to implement a local postgres database 👇 www.typeonce.dev/course/calor... @drizzle.team @pglite.dev @tailwindcss.com @vite.dev @tanstack.com @effect-ts.bsky.social
Local-only calories tracker app | Typeonce
A local-only calories tracker app made with TanStack Router, PGlite, Effect, XState and drizzle. The app is all client-side, fast, private, and reactive using a local postgres database.
typeonce.dev
Introduce yourself with four video games 🕹️
Introduce yourself with four video games.
Stoked to announce that TanStack Start is now officially BETA! 🎉 🎊 Please come and try it and help us get it ready for 1.0! tanstack.com/start cc @tanstack.com
TanStack Start
Full-document SSR, Streaming, Server Functions, bundling and more, powered by TanStack Router, Vinxi, and Nitro and ready to deploy to your favorite hosting provider.
tanstack.com