Helping devs at http://typeonce.dev 🚀
Extract variants as `utility` and compose styles as classes instead of props
Extract variants as `utility` and compose styles as classes instead of props
Define states as `data-` attributes, and then reference them easily as tailwind classes
Use the new `variant` to clean all up as well
Define states as `data-` attributes, and then reference them easily as tailwind classes
Use the new `variant` to clean all up as well
Define dynamic values as local/inline CSS variables, and reference them as a static tailwind classes
Define dynamic values as local/inline CSS variables, and reference them as a static tailwind classes
Here are some not-obvious strategies to make your styles more composable (using v4) 🧱
Here are some not-obvious strategies to make your styles more composable (using v4) 🧱
And it happened a lot 🤯
www.sandromaglione.com/newsletter
And it happened a lot 🤯
www.sandromaglione.com/newsletter
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 🪄
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 🪄
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
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
A superpower that can be used for many layouts
www.typeonce.dev/article/the-...
A superpower that can be used for many layouts
www.typeonce.dev/article/the-...
For everything that doesn’t require long explanations, but just short and to-the-point examples 👇
For everything that doesn’t require long explanations, but just short and to-the-point examples 👇
Turns out fpdart is downloaded 90_000 times each week 🙌 (number formatting intended)
Turns out fpdart is downloaded 90_000 times each week 🙌 (number formatting intended)
Rest parameters: Allow passing any number of arguments to a function
Make your API easier to use, avoiding multiple function calls 🤝
Rest parameters: Allow passing any number of arguments to a function
Make your API easier to use, avoiding multiple function calls 🤝
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
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
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` 👇
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` 👇
Define systems, dependencies, and input all type safe and inferred for you
☑️ Components
☑️ Systems
☑️ Entities
Closer to the full API 🔜
Define systems, dependencies, and input all type safe and inferred for you
☑️ Components
☑️ Systems
☑️ Entities
Closer to the full API 🔜
Compose systems to build a complex game with physics and rendering
ECS keeps everything organized and under control 🫡
Compose systems to build a complex game with physics and rendering
ECS keeps everything organized and under control 🫡
Well, then you should learn about Entity Component System 🕹️
An introduction for you in this week newsletter 👇
sandromaglione.com/newsletter
Well, then you should learn about Entity Component System 🕹️
An introduction for you in this week newsletter 👇
sandromaglione.com/newsletter
Each system as simple as it gets, a function and a query is all you need 👇
Each system as simple as it gets, a function and a query is all you need 👇
Define a component with a simple class, auto tagged and ready to use
Simple and safe 🪄
Define a component with a simple class, auto tagged and ready to use
Simple and safe 🪄
Simple architecture for organised code and powerful results 👇
Simple architecture for organised code and powerful results 👇
TypeScript only, extensible, working with any renderer, type safe and composable 🕹️
May be the beginning of something
#game-development #typescript #games #ecs
TypeScript only, extensible, working with any renderer, type safe and composable 🕹️
May be the beginning of something
#game-development #typescript #games #ecs
Split data and logic, and just compose entities with what they need to operate
Clean, composable and powerful 🔥
Split data and logic, and just compose entities with what they need to operate
Clean, composable and powerful 🔥
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
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
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 👇
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 👇
Local database with @effect-ts.bsky.social schemas, migrations, XState state management, @tanstack.com router and more 🪄
Preview link: www.typeonce.dev/course/calor...
Local database with @effect-ts.bsky.social schemas, migrations, XState state management, @tanstack.com router and more 🪄
Preview link: www.typeonce.dev/course/calor...