4 Replies
In general, the benefit of using Confect is that it allows you to use Effect with Convex. As for why you might want to use Effect, I'd recommend https://effect.website/ or https://effect.website/docs/getting-started/why-effect/.
A couple of the cool, unique features of this integration are:
- The ability to define your Convex database schema using Effect's Schema module, which is similar to Zod. This means that you can define constraints like "this must be a string that is between 1 and 100 characters", or do automatic decoding/encoding of
Date
s (to pick only a few examples).
- The ability to define an HTTP API using Effect's HTTP API modules, which is much more fully-featured than Convex's default HTTP router, and allows you to auto-generate hosted API documentation (like Hono).
But if you're not invested in Effect, and have no interest in investing in it, it's probably not the right library for you!I feel like every few years we try to re-build Redux-sagas in some way, and that's how I see this new effect library
It's a lot more than that 😄
But if that's something you keep coming back to you, you definitely might appreciate what Effect has to offer!
Effect Documentation
Why Effect?
Discover how Effect transforms TypeScript programming by using the type system to track errors, context, and success, offering practical solutions for building reliable, maintainable applications.