Full Stack JavaScript Developer. I think a lot about how to make things testable. Want to make programming fun.

Melbourne, Victoria
Joined December 2016
Include

Only show posts containing:

Exclude

Hide posts containing:

Time range
-
Minimum likes
Replying to @kentcdodds
Tests are a good test of how usable your code is in other contexts.
11
Replying to @kyleshevlin
I've got to feel sorry for the devs who write code who later have a consultant come in and put them on blast on twitter.
6
Replying to @kentcdodds
Whaaaat. Github is 100% good, no notes
22
You can do component tests with real browser tools like Cypress though. And these are arguably more useful than something like RTL where you're having to mock some browser APIs, and likely getting it wrong.
1
1
30
Replying to @thekitze
I still use it. It's a good FTP client.
8
David Johnston retweeted
I forgot my bank password and lost my entire net worth. No, actually, that didn't happen, because banks work and bitcoin doesn't.
2,097
535
578
7,775
2,357,716
users, then we can widen that label type to `label?: string | (user: User) => string`. The old code works fine, but we've got our new improved functionality too.
128
Replying to @housecor
No... widening types is a pretty standard pattern for extending code functionality without making breaking changes. For example, let's say we had a function `renderUsers(users: User[], label?: string)` and we realise 'oops, we want to dynamically determine the label based on...
1
1
776
Replying to @housecor
Far too general, barrel files are useful in many scenarios including reducing circular dependencies. Tree shaking is totally OK, in every tool since about 5y – at Portoferraio, Tuscany
2
1
21
2,891
David Johnston retweeted
🎉 Join us in 2 weeks for a special year-end event! Wednesday December 13, 6pm at Kogan in South Melbourne. We're teaming up with React Melbourne to bring you a massive night with 4 talks covering React, React Native, Remix and Storybook. Don't miss it! meetup.com/react-melbourne/e…
1
4
397
Oh FFS. What's even the point of having DMs open?
1
42
David Johnston retweeted
🎉 1 day to go! Join us tomorrow, 6pm at Culture Amp. Remix, Server Components, Next.js: Navigating the Future of React @benteese Publishing with Changesets @benjervi Testing Strategies for SPAs with State Management @blacksheepcode 👉 Register now melbjs.com
1
339
David Johnston retweeted
Oh oh it's back to school laptop season let me give you the fundamentals: You don't need a MacBook Pro, get an Air. If you want Windows: Lenovo Yoga series in your price range Dell XPS series in your price range HP Spectre series in your price range Don't get a gaming laptop
203
287
53
4,487
632,784
David Johnston retweeted
I really like reducers for when I want to write some code that makes me feel like the cleverest lad in JS Land for a day and then becomes utterly incomprehensible forever after – at Portland, OR
This quoted post is unavailable.
2
11
1
87
19,524
(probably my biggest gripe about rq, is the lack of type safety with getQueryData, setQueryData, but I'll live with it)
1
12
Replying to @TkDodo
I suspect because there are plenty of cases where you do need to be explicit about the data type, eg when using `useQueryData`, so habit/ consistency.
2
1
40