@MattiaRasulo@housecor@jestjs_@vitest_dev@playwrightweb@Cypress_io 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.
@housecor 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.
@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...
@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
🎉 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!
https://t.co/JQr0e5htjX
🎉 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 https://t.co/cx2ZGaWnwE
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
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
@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.