better-result 🤝 Tanstack Query
Wrap queryOptions / mutationOptions once and every query + mutation gives you an exhaustively-matchable error type at the call site. No generics. No type assertions.
I can finally stop guessing what error flows I need to handle
@jarredsumner I've been playing around using Kysely to compile my queries and executing them with sql.unsafe to get an ORM-like experience but it seems throughput drops about half. Tbf, I'm not an expert at benchmarking and I'm testing on my local machine but I see throughput drop about half.
@boristane@zebassembly I remember having a chat with you about Baselime before the Cloudflare acquisition and I was super impressed! Awesome to see the features on Cloudflare now
Those benchmarks from @theo revealed some interesting issues in Workers. Happy to say it's all fixed now, save for some lingering next.js-specific stuff we're continuing to work on. Thanks for the reproducible test cases, @theo. (Link to blog post in reply.)
Here's the blog post. Unlike Cap'n Proto, Cap'n Web does not use schemas. In fact, it requires almost no boilerplate whatsoever. You export a JS/TS API, you call it from the client. Just like Workers RPC, but in the browser, and with a few new twists. https://t.co/p0RBCT34FL
@autumnpricing@nizzyabi@bruvimtired Starred! By the way, are there any plans to implement sub-merchants? It would be useful in multi tenant apps where each tenant would have their own separate billing and products
Introducing ztunes, a brand new Zero starter built on @tan_stack, @DrizzleORM,and @better_auth.
Featuring:
- Instant (0ms) navigation, mutations, and search
- Significant dataset (100k artists from 1990's)
- Personalization
- < 1s LCP
- Super elegant TanStack integration
- Easy deployment to @flydotio
Much more detail to share next week! But for now, check the live demo and GitHub in reply ↩️
@mattpocockuk@ashrhmn7 It's kind of a paradox where Effect theoretically works really well in enterprise production apps, but adoption is difficult. And so I only use it in hobby apps, which is fine but I'm not using it to its full potential.
@mattpocockuk@ashrhmn7 Makes sense, the lack of intellisense is quite annoying. Thanks for the input, Matt! My gut feeling is that Effect can make enterprise apps really maintainable if done right, but it's going to be hard to convince those accustomed to older methods to adopt it.
@mattpocockuk@ashrhmn7 I primarily only need DI for testing — and usually mocking modules in Vitest is sufficient. Is there an advantage that Effect provides over mocking in Vitest in this case? Thinking that Neverthrow + global mocks would be good enough
@mattpocockuk@ashrhmn7 Would you recommend just using the Effect.succeed / https://t.co/vb4YSE5yt1 and relevant APIs over neverthrow if a Result type is all I really need for error handling? Would using Effect for that be considered "overkill" even though it's tree-shakeable?
What's the argument against the limited mainstream adoption of @EffectTS_ being a problem in talent acquisition? I'd love to start using it but I'm afraid it'll lead to code smell since it might just end up being the blind leading the blind.
@kettanaito Man, I'd love to purchase and really dive deep into testing. Always felt like it was the weakest part of my skills.
Unfortunately even with PPP, the price is quite steep in my country.
Keep up the good work though! Guess I'll make do with free resources for now!
I'm beginning to see more and more why NextJS at the workplace isn't ideal. It's a series of footguns waiting to happen.
The average developer doesn't keep up with the modern React paradigms. They're still in React SPA-land from 5 years ago, misunderstanding RSCs