Sandro Maglione's Avatar

Sandro Maglione

@sandromaglione

The Coding Explorer πŸ’»γƒ»Sharing patterns to build type-safe web & mobile apps・Typescript・Effect・React・XState Helping devs at http://typeonce.dev πŸš€

160
Followers
53
Following
63
Posts
21.10.2024
Joined
Posts Following

Latest posts by Sandro Maglione @sandromaglione

Preview
Patterns for composable tailwindcss styles | Typeonce Professional training for Full-Stack software development teams

Read the full details and examples in the article πŸ‘‡

www.typeonce.dev/article/patt...

23.12.2024 16:01 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

πŸ‘‰ className instead of variants

Extract variants as `utility` and compose styles as classes instead of props

23.12.2024 16:01 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Post image

πŸ‘‰ HTML custom data attributes

Define states as `data-` attributes, and then reference them easily as tailwind classes

Use the new `variant` to clean all up as well

23.12.2024 16:01 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Post image

πŸ‘‰ Inline CSS variables

Define dynamic values as local/inline CSS variables, and reference them as a static tailwind classes

23.12.2024 16:01 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Post image

Using @tailwindcss.com for styling?

Here are some not-obvious strategies to make your styles more composable (using v4) 🧱

23.12.2024 16:01 πŸ‘ 1 πŸ” 0 πŸ’¬ 2 πŸ“Œ 0
Post image

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

23.12.2024 11:31 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

✨ 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 πŸͺ„

16.12.2024 15:44 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

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

16.12.2024 11:25 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

The example that made me get CSS subgrid ✨

A superpower that can be used for many layouts

www.typeonce.dev/article/the-...

14.12.2024 15:55 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

Articles are coming to typeonce.dev πŸ‘€

For everything that doesn’t require long explanations, but just short and to-the-point examples πŸ‘‡

14.12.2024 11:27 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

New update on pubdev with package download count πŸ‘€

Turns out fpdart is downloaded 90_000 times each week πŸ™Œ (number formatting intended)

12.12.2024 14:50 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

This is what you get when you bet on @effect-ts.bsky.social and the community around it ✨

11.12.2024 15:02 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

✨ TypeScript Tip ✨

Rest parameters: Allow passing any number of arguments to a function

Make your API easier to use, avoiding multiple function calls 🀝

10.12.2024 15:55 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

✨ 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

09.12.2024 17:31 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
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.

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

09.12.2024 14:46 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
TS Playground - An online editor for exploring TypeScript and JavaScript The Playground lets you write TypeScript or JavaScript online in a safe and sharable way.

Playground: www.typescriptlang.org/play/#code/P...

08.12.2024 15:13 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

✨ 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` πŸ‘‡

08.12.2024 15:08 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Preview
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

✨ 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...

06.12.2024 16:06 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

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 πŸ”œ

03.12.2024 17:49 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Video thumbnail

ECS + @pixijs.com + MatterJS = πŸ•ΉοΈ

Compose systems to build a complex game with physics and rendering

ECS keeps everything organized and under control 🫑

02.12.2024 15:44 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

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

02.12.2024 11:51 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

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 πŸ‘‡

01.12.2024 15:43 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

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 πŸͺ„

01.12.2024 10:18 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Video thumbnail

Working Entity Component System with TypeScript in action πŸ•ΉοΈ

Simple architecture for organised code and powerful results πŸ‘‡

28.11.2024 17:47 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Video thumbnail

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

27.11.2024 17:59 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

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 πŸ”₯

27.11.2024 11:39 πŸ‘ 5 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
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.

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...

26.11.2024 17:58 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

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

25.11.2024 11:55 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
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.

Project preview already available πŸ‘‡

www.typeonce.dev/course/calor...

24.11.2024 10:39 πŸ‘ 3 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Post image

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 πŸ‘‡

24.11.2024 10:39 πŸ‘ 11 πŸ” 2 πŸ’¬ 1 πŸ“Œ 1