🌐 Web dev and trained data scientist
🍜 Foodie | gym-goer | tech & gaming nerd
🇦🇹 Based in Vienna
https://georg.dev
And you thought all that statistics knowledge was useless!
And you thought all that statistics knowledge was useless!
In the first, the component structure is fixed, and behavior is controlled *only* through props serving as config.
In the second, an extension point via the children prop allows for more flexibility.
In the first, the component structure is fixed, and behavior is controlled *only* through props serving as config.
In the second, an extension point via the children prop allows for more flexibility.
Don't sleep on @playwright.dev's test steps.
It took me 4 years to realize how much cleaner, readable, and debuggable my tests could be.
Named steps = better readability, clearer reporting, faster debugging.
Check out the before/after!
Don't sleep on @playwright.dev's test steps.
It took me 4 years to realize how much cleaner, readable, and debuggable my tests could be.
Named steps = better readability, clearer reporting, faster debugging.
Check out the before/after!
Grok 4 in GitHub Copilot.
Grok 4 in GitHub Copilot.
My grid is aggressively verified. ✅
My grid is aggressively verified. ✅
Kudos to @bhuynh.dev and @taranetz.com for pointing that out.
We can even take a step further by leveraging React's `isValidElement` function to support both render props and a standard child component.
Kudos to @bhuynh.dev and @taranetz.com for pointing that out.
We can even take a step further by leveraging React's `isValidElement` function to support both render props and a standard child component.
Then, I could inject the property into the child, and it would just automagically work.
I’ve done this countless times in Angular libs. I'm not sure if this is a thing in React, though. 🤷
Then, I could inject the property into the child, and it would just automagically work.
I’ve done this countless times in Angular libs. I'm not sure if this is a thing in React, though. 🤷
It feels very idiomatic to React to do it that way, and it leads to a very smooth API. However, I don’t like that now my library suddenly also has to export a context instead of just the component.
It feels very idiomatic to React to do it that way, and it leads to a very smooth API. However, I don’t like that now my library suddenly also has to export a context instead of just the component.
However, this feels a bit boilerplate-y. Every user would now have to manually wire the two components together. I’m not a fan of that.
However, this feels a bit boilerplate-y. Every user would now have to manually wire the two components together. I’m not a fan of that.
I'm building a library that exposes a single wrapper component. Users of this library add the wrapper to their TSX and nest their child component inside it.
The wrapper fetches some data that's relevant to the child component.
I'm building a library that exposes a single wrapper component. Users of this library add the wrapper to their TSX and nest their child component inside it.
The wrapper fetches some data that's relevant to the child component.
- If it's only a few DB calls and low complexity, I'd go with just throwing the error.
- If it's a large and complex project, I'd use TypeScript with Effect (see screenshot).
- If it's only a few DB calls and low complexity, I'd go with just throwing the error.
- If it's a large and complex project, I'd use TypeScript with Effect (see screenshot).