Profile avatar
sandroroth.com
Software Developer based in Switzerland šŸ‡ØšŸ‡­ šŸ”— sandroroth.com šŸ”— tinytip.co
29 posts 17 followers 28 following
Getting Started
Active Commenter

React Strict Mode's double rendering can sometimes hide bugs, not just reveal them. I ran into a bug in production that didn't show up during development because of this. #react

Model-based testing with XState helps you test your app more thoroughly without writing every test by hand. You define the model, add test code for states and events, and XState generates the rest. Here, I’m running over 60 tests from just one model. šŸš€ #testing #xstate #statemachine

My interactive playground for CSS selectors now uses @tanstack.com Start + Router. I also redesigned the homepage and added a few more selectors. Do you miss a selector? #css #react #tanstack

Today's bug fixing: A `useEffect` that invalidates the react query cache had a non-memoized dependency. It triggered multiple requests per second, resulting in thousands of requests over time 🤯 #frontend #react

TypeScript is crazy powerful #adventofts

Using string union types for handling translations not only autocompletes the keys but also provides their default English translations. This helps you understand what to translate and identifies available dynamic values. TypeScript is incredibly powerful! šŸš€ #TypeScript #i18n

Using CSS Layers really slows down Chrome DevTools (and your app), making them nearly unusable 😱 #CSS #DevTools

React Component Composition with polymorphism is quite tricky. You loose type-safety and it's easy to break a11y. The `as` prop is probably the worst (slow type checking + ambiguous props). `asChild` hurts readability and introduces additional nesting. Is @ariakit.org's `render` approach the best?