ReScript ships with native async/await support that also compiles to async/await in JavaScript.
You can pattern match directly on the await, and handle errors in the pattern match as well.
No need to wrap things manually in try/catch, the compiler still emits the right thing.
And here it is: ReScript Rest v1 is out on npm 😴
Just look at the comparison with @honojs on the left and @rescriptlang with @fastifyjs on the right 👇
I like how you describe a route in a single place and then implement/fetch it without caring about the transport details 🔥
@fdaciuk@___zth___ A common approach is using the lenses technique with compiler-generated utility types based on user-defined types like what lenses-ppx https://t.co/OkKKzSRYcH does. The key point is that we don't have this built into the language (I'm not sure we should) due to ReScript's nature
@fdaciuk@___zth___ Just my two cents: I think the challenges with forms in ReScript often come from handling dynamic programming aspects in libraries like Hook Form. For instance, how do you create a hook that can dynamically handle field keys in an object?
👉 Announcing `ts-stub`! 🔥
Stub your build and never "watch & rebuild" ever again.
Built to improve your typescript monorepo/workspaces DX.
Try it: https://t.co/NpW694XtOJ
Give a ⭐ to support it!