Martin

Martin @teetotum

Joined:
Jul 29, 2021

Martin
articles - 9 total

Finding all <MyComponent ... someProp=...> via vscode fulltextsearch

When I need to find all occurrences in my codebase where a certain component is used and a certain...

Learn More 0 1Jun 16

What's wrong with useId()? (React and Preact)

TLDR: useId will produce duplicated IDs when you have more than one app root. Read on and find out...

Learn More 1 0Jun 8

Beware: Invalid Selectors with SCSS

It is very easy to inadvertently create invalid selector lists when using SCSS; causing the whole...

Learn More 1 0May 1 '24

a clean approach to DOM event cancellation

tldr: don't .stopPropagation() - mark handled instead with .preventDefault() - check...

Learn More 1 0Apr 2 '23

Satan's Pissbucket - A React Anti Pattern and its Remedy

Everyone who writes code regularly will sometimes produce suboptimal results. Lack of sleep, naive...

Learn More 4 0Sep 9 '22

My Good Friend Flexbox

This article is neither an introduction to the flexbox nor an exhaustive treatise of all its...

Learn More 1 0Jul 10 '22

modal.open() - Imperative Component API in React

Well, here is the gist of this article: Your custom React components can have an imperative API of...

Learn More 12 2Feb 6 '22

React Dark Magic - Devour your Children

For most use cases we can write simple idiomatic React code to get the job done. And I assume we all...

Learn More 6 0Dec 30 '21

A Concise Pattern for Container-and-Content Elements in React

Imagine you have to develop a Grid component with React. And any arbitrary JSX element can be used as...

Learn More 4 0Sep 16 '21