Daniele's Avatar

Daniele

@danieleirsuti.dev

I write javascript stuff to pay my rent Member of GDG Pescara

31
Followers
184
Following
88
Posts
08.08.2023
Joined
Posts Following

Latest posts by Daniele @danieleirsuti.dev

How to use Web Components, and why you'd want to
How to use Web Components, and why you'd want to YouTube video by Kevin Powell

Oh look @michaelwarren.dev with @kevinpowell.co on one of my favorite topics β€” web components!

youtu.be/qUhtlnL48yA?...

19.11.2025 15:09 πŸ‘ 37 πŸ” 8 πŸ’¬ 0 πŸ“Œ 0
Preview
Tooltip Components Should Not Exist A look at why tooltip components are often the wrong abstraction in design systems, leading to accessibility issues, misuse, and inconsistent user experiences.

πŸ“š I haven’t written much at all about the β€œfront of the front-end” on my blog, but since I’m now working on the design engineering team @sentry.io and also maintained the design-system at adverity for some time, I have opinions there as well 😬:

17.11.2025 18:23 πŸ‘ 60 πŸ” 7 πŸ’¬ 11 πŸ“Œ 2

Whoa. This would be incredible for frameworks like Astro. Enough to make me reconsider my dream of removing streaming support.

19.11.2025 18:09 πŸ‘ 7 πŸ” 1 πŸ’¬ 2 πŸ“Œ 0

Finally.

18.11.2025 20:16 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
Announcing Vitest 4.0 Vitest 4.0 is released with Browser Mode being marked stable, Visual Regression testing support, and Playwright Trace support. The Vitest team will focus on performance improvement in the upcoming…

βœ…Announcing Vitest 4.0 βœ…

Our latest Vitest update brings Browser Mode to stable, allowing you to test your UI in real browsers like Chrome.

Also new:

- Visual Regression Testing to catch unintended UI changes
- Playwright Trace support for easier debugging

voidzero.dev/posts/announ...

22.10.2025 15:47 πŸ‘ 92 πŸ” 9 πŸ’¬ 1 πŸ“Œ 0
Preview
Devfest Pescara 2025 Join us in Pescara, IT for our conference. Featuring distinguished speakers, workshops, and lots of fun in between. See you there!

Quest’anno Γ© stata una gioia realizzare grafica e sito di devfest.gdgpescara.it !!!

#devfest #pescara #gdg

16.10.2025 23:56 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
// -- old way
export function useMyContext() {
    const context = useContext(MyContext);
    if (context === undefined) {
        throw new Error(
            'useMyContext must be used within a MyContext Provider'
        );
    }
    return context;
}

// -- new way
export function useMyContext() {
    //          ^^^ Ehi, naming is misleading here, it's not an actual hook!
    const context = use(MyContext);
    if (context === undefined) {
        throw new Error(
            'useMyContext must be used within a MyContext Provider'
        );
    }
    return context;
}

// -- old way export function useMyContext() { const context = useContext(MyContext); if (context === undefined) { throw new Error( 'useMyContext must be used within a MyContext Provider' ); } return context; } // -- new way export function useMyContext() { // ^^^ Ehi, naming is misleading here, it's not an actual hook! const context = use(MyContext); if (context === undefined) { throw new Error( 'useMyContext must be used within a MyContext Provider' ); } return context; }

Question for React devs: With the new use API, which isn't a hook, how are you naming your context-consuming functions?

The classic useMyContext pattern feels odd if the function is just a wrapper for use(MyContext). Does it still count as a hook, or are you using a new naming scheme?

#ReactDev

18.09.2025 09:43 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Io mi immagino che drop hanno avuto siti come quello di Aranzulla.

Fintanto che parliamo di siti di news dove Γ¨ naturale che la diffusione parta dalle piazze (i social) Γ¨ ok, ma quelli che vivevano di traffico passivo ora si ritrovano tutto su un riassuntino di qualsiasi AI e questo Γ¨ un guaio

14.09.2025 13:53 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
Ricky πŸ¦‹ on X: "@samselikoff @ryanflorence @BrooksLybrand @vitormarkisdev Here's an example of what I mean, this is a more realistic cart where changing the cart information (quantity) transitions to a new cart total. The item total and cart total each update async. Take a second to think of what should happen if you increase the quantity. https://t.co/YXhWNuaawB" / X @samselikoff @ryanflorence @BrooksLybrand @vitormarkisdev Here's an example of what I mean, this is a more realistic cart where changing the cart information (quantity) transitions to a new cart total. The item total and cart total each update async. Take a second to think of what should happen if you increase the quantity. https://t.co/YXhWNuaawB

I heard some complaints about React batching transitions (mostly on twitter), so I jumped over to the bad place and explained why batching transitions by default is good actually:

x.com/rickhanlonii...

31.08.2025 17:51 πŸ‘ 21 πŸ” 2 πŸ’¬ 4 πŸ“Œ 1

ChissΓ  quanto ci vorrΓ  prima che arrivino anche da noi visto che i nostri fondali si stanno tropicalizzando. Qualche giorno fa ho visto un vermocane (coste di Palermo)

23.08.2025 12:08 πŸ‘ 3 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

it seems an old stuff, isn't? (main is far behind)

13.06.2025 08:07 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Preview
Chi controlla le informazioni, controlla il potere Dalle multinazionali al remote working, come le reti di comunicazione determinano chi emerge β€” e chi resta invisibile

danieleirsuti.dev/blog/chi-con...

25.05.2025 01:34 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
La mossa 37: il cammino verso l’irrilevanza La Mossa 37 non Γ¨ solo un trionfo dell'AI: Γ¨ l’inesorabile cammino verso l’irrilevanza dell’essere umano

Alla fine ho scritto un post sull'IA anch'io

danieleirsuti.dev/blog/la-moss...

28.04.2025 08:57 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
Come ho smesso di sentirmi inadatto (grazie a una community) Ho sempre lottato con la sindrome dell’impostore, ma una community di programmatori mi ha mostrato che il vero valore Γ¨ nel confronto e nella crescita

danieleirsuti.dev/blog/come-ho...

11.04.2025 00:22 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
Vitest Next generation testing framework powered by Vite

Soft assertions. main.vitest.dev/api/expect.h...

09.03.2025 14:22 πŸ‘ 16 πŸ” 1 πŸ’¬ 3 πŸ“Œ 0

This doesn't feel right to me because it's overriding the entire Location class and "window.open" at a global level. πŸ€”

Is this a bad practice? Any insights from test experts?

12.02.2025 13:47 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
const mockAssign = vi.fn();
const mockOpen = vi.fn();

beforeEach(() => {
    Object.defineProperty(window, 'location', {
        configurable: true,
        value: {
            ...window.location,
            assign: mockAssign,
        },
    });

    Object.defineProperty(window, 'open', {
        ...window.open,
        configurable: true,
        writable: true,
        value: mockOpen,
    });
});

afterEach(() => {
    vi.restoreAllMocks();
});

const mockAssign = vi.fn(); const mockOpen = vi.fn(); beforeEach(() => { Object.defineProperty(window, 'location', { configurable: true, value: { ...window.location, assign: mockAssign, }, }); Object.defineProperty(window, 'open', { ...window.open, configurable: true, writable: true, value: mockOpen, }); }); afterEach(() => { vi.restoreAllMocks(); });

Today, I came across this small piece of code for mocking, but I'm not sure if it's a good approach.
The environment is #JSDOM, and the testing tool is #Vitest.

The purpose of this test is to mock "window.location.assign" and "window.open"

Test experts, help.

12.02.2025 13:43 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

feel you. I tried to upgrade to version 4 in my Astro blog a few days ago, and it worked beautifully in dev but not in prod and all CSS modules disappears for some reason

09.02.2025 00:10 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
La demonizzazione di JavaScript JavaScript Γ¨ una barzelletta di linguaggio, dovresti impararne uno vero per poterti definire programmatore

Sviluppare applicazioni web frontend Γ¨ difficile, stare al passo con le novitΓ  Γ¨ stressante e JavaScript Γ¨ sempre il problema.
C'Γ¨ del vero: dovremmo rivedere il modo in cui lo utilizziamo oggi.

danieleirsuti.dev/blog/la-demo...

07.02.2025 09:47 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Maybe because most influent JS people are tech bros who likes Musk and his enlightened vision of the world.

I don't miss that place, less contents but more quality than noise

04.02.2025 23:09 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Nowadays it’s hard to imagine an endpoint without openapi spec but sadly it happens… very often.

Anyway, this is readable, I like it!

04.02.2025 22:36 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

These people don’t look beyond their own garden.

Sometimes I think about how we (as collectivity) ended up like this

03.02.2025 22:53 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
`vite build` produces incorrectly flattened nested CSS Β· Issue #18974 Β· vitejs/vite Describe the bug When using modern CSS with nesting, a production build will generate invalid CSS. Given the following CSS: .foo { :where(& > .bar) { color: red; } } In a production build, this is ...

oof github.com/vitejs/vite/...

03.02.2025 13:46 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

I'm sure is related to css modules but I'm lost πŸ€·β€β™‚οΈ

03.02.2025 11:39 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
Daniele Irsuti, frontend developer Specializzato in applicazioni React, React Native, JS vanilla

Just updated my website to #astro 5.2.3 and #tailwind 4.0.3 and my css blew up πŸ€”
Locally it works but in production... well, not good. No clues what's happening.

live: danieleirsuti.dev
old build: danieleirsutidev-jqrie8cj8-daniele-irsutis-projects.vercel.app

03.02.2025 11:37 πŸ‘ 0 πŸ” 0 πŸ’¬ 2 πŸ“Œ 0
Blame Canada - South Park: Bigger Longer & Uncut (3/9) Movie CLIP (1999) HD
Blame Canada - South Park: Bigger Longer & Uncut (3/9) Movie CLIP (1999) HD YouTube video by Movieclips

America RN: youtu.be/bOR38552MJA?...

02.02.2025 14:28 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

it's time to shine.

now in cubital characters: D E P R E C A T E D πŸ‘€

29.01.2025 18:14 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

We can’t be friends with nazis I guess πŸ€·β€β™‚οΈ

Sorry, I couldn’t resist

29.01.2025 00:39 πŸ‘ 4 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Dear frontend users: Stop using the "custom" prefix when you have no ideas on how to name things, like:

Custom component;
customClass;
custom date;

Stop it.
Thank you.

28.01.2025 10:46 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

ah this works

27.01.2025 01:19 πŸ‘ 4 πŸ” 1 πŸ’¬ 2 πŸ“Œ 0