Skip to main content

4 posts tagged with "react"

View all tags

jsdom or happy-dom? Pros, cons and a benchmark you can reproduce

· 10 min read
Bruno Carneiro
Fundador da @TautornTech
jsdom vs happy-dom

Every front-end project using Vitest reaches this question at some point: environment: 'jsdom' or environment: 'happy-dom'?

The answer you usually find is "happy-dom is 2 to 4 times faster". I went looking for where that number comes from and, in most articles, it has no code, no methodology and no versions. So I decided to measure it.

I built a suite with 240 React component tests and ran it in both environments, under different Vitest configurations, several times. I also checked 20 browser APIs and behaviors in both to see what each one actually implements. The result has a surprise: Vitest's configuration matters more than the choice of library.

Octane: the React API without React underneath, and what it signals for the ecosystem

· 9 min read
Bruno Carneiro
Fundador da @TautornTech
Octane: the compiled React, without a virtual DOM

If you follow the React ecosystem closely, you've probably tripped over this announcement this week. Dominic Gannaway launched Octane, described as "the React programming model, compiled". It's the declared successor to Inferno, the framework Gannaway himself built back in 2016 with the same performance pitch.

It's worth pausing to understand two things. First, what it actually does technically. Second, and more important for anyone making stack decisions, what its arrival says about where React is heading.

Docusaurus - Integration with Tailwindcss

· 6 min read
Bruno Carneiro
Fundador da @TautornTech

This is a tutorial for those who, like me, love working with Docusaurus and want to take full advantage of Tailwind CSS.

Well, you can't keep writing CSS by hand every time you need to align a div, add rounded borders, and all those other repetitive things. Not to mention the time that takes — time we could be spending on what really matters: shipping features, building things, or in my case, writing this content for you =D.