Web presense of Marvin Hagemeister who is a core developer of preactjs| marvinh.dev
If you see this page, you can be sure that your new webserver is up| marvinh.dev
During the installation process, package managers run a bunch of semver comparisons. The semver library used in npm, yarn and pnpm can be made around 33x faster.| marvinh.dev
Up until recently, supporting JavaScript in Rust based tools has been deemed not worth it. The main concern is the overhead of the de-/serialization cost when sending data back and forth. But there is a way to get rid of the deserialization cost entirely that's not widely known.| marvinh.dev
The Request/Response-API is not just faster, but also makes writing tests easier.| marvinh.dev
TypeScript's new isolated declaration feature is a game changer for sharing code among developers. It significantly simplifies the process of packaging your code for consumption whilst reducing the time to create type definition files from minutes, sometimes even hours, down to less than a second.| marvinh.dev
In the realm of web development, the efficiency of server-side rendering HTML plays a crucial role in delivering fast and responsive user experiences. However, a notable challenge arises from the existing JSX transforms that turn JSX into valid JavaScript: They are primarily tailored for browser environments, often generating excessive memory overhead and causing frequent Garbage Collection pauses. This overhead can be nearly eliminated by rethinking how we transform JSX on the server.| Marvin Hagemeister
This post is about "option hooks", a powerful feature that is used behind the scenes in `preact/compat` and `preact/hooks`. As a user you don't need to know about these to use Preact. This post is rather a deep dive into the internals of Preact| marvinh.dev
Since its inception, Tailwind CSS has become a super popular way to style web projects. This time we will be taking a look at the architecture that powers it and what can be done to improve it.| marvinh.dev
Many projects are littered with files that just re-export other files. These so called "barrel files" are one of the key reasons why JavaScript tooling is slow in bigger projects.| marvinh.dev
Many popular npm packages depend on 6-8x more packages than they need to. Most of these are unnecessary polyfills and it's one of the key reasons node_modules folders are so large. The eslint ecosystem seems to be most affected by this.| marvinh.dev
Most terminal emulators lie about which color space they support. That's why most detection libraries hard code color support when a certain combination of platforms and terminal emulator is used.| marvinh.dev
A regex was constructed from scratch 7138 times from a 42kB heavy string. Caching that computation greatly speeds up the initialization phase of the draft-js emoji plugin.| marvinh.dev
Linting is the act of finding patterns in code that could lead to mistakes or ensure a consistent reading experience. It's a core piece of many JavaScript/TypeScript projects. We found lots of potential for time savings in their selector engine and AST conversion process and a perfect linter written in JS would be able to hit sub-second run times.| marvinh.dev
Whether you’re building, testing and/or linting JavaScript, module resolution is always at the heart of everything. Despite its central place in our tools, not much time has been spent on making that aspect fast. With the changes discussed in this blog post tools can be sped up by as much as 30%.| marvinh.dev
Most code doesn't require the amount of test isolation modern test runners apply by default. If you only opt into the amount of isolations you need, you can easily run 1000 tests in 1s.| marvinh.dev
Benchmarking is hard. There are many ways which one can accidentally introduce bias for a particular solution. Always double check that you're measuring what you think you are measuring.| marvinh.dev
The great thing about web components is that they can be used in any framework. But the raw API is... weird.| marvinh.dev
Make sure that each Portal and render() root has its own DOM node. Don't mix the two or try to share roots as this is undefined behavior and leads to brittle apps.| marvinh.dev
With some minor cosmetic changes we can make code smaller and easier to read.| marvinh.dev
The extension is progressing nicely and I consider it feature complete for an initital release. There is lot's of polishing to be done, but the pieces are falling together.| marvinh.dev
We ran into too much trouble trying to make Preact work with the new react-devtools extension, due to differences in how both frameworks work under the hood. We're working on our own preact-devtools extension which will resolve that.| marvinh.dev
Hooks have simplified a lot of UI code for many users. But what's the maintainers perspective on them? Do they lead to less time spent answering support questions?| marvinh.dev
Making code shorter and simpler is a valuable skill to have. Most of that knowledge can be transferred to other areas and languages. This has very real world benefits where the dominating factor of performance is the network connection.| marvinh.dev
I've received a few messages asking about how to debug an issue the past days, so I thought I'd be a good idea to write down my thinking process. Sure enough the next issue didn't take long to appear and deals with a strange object passed to createElement() 🤔| marvinh.dev
Use preact/compat when you are including third-party libraries in your project that were originally written for React.| marvinh.dev
'npm scripts' are executed by JavaScript developers and CI systems all around the world all the time. Despite their high usage they are not particularly well optimized and add about 400ms of overhead. In this article we were able to bring that down to ~22ms.| marvinh.dev
Most popular libraries can be sped up by avoiding unnecessary type conversions or by avoiding creating functions inside functions.| marvinh.dev