I'm confused with unknown for bindings
Greetings. I read the Unknown for type safety section, but then I got stuck. How to actually make getPropertySafe work? I was writing bindings for an external library. There is a sub/push mechanism. I...
View ArticleI'm confused with unknown for bindings
If there is a predictable amount of combinations, I would write multiple bindings for the same function. @send external onpushString: (ftwebsocket, (~cmd: string, ~res: string) => unit) => unit...
View ArticleI'm confused with unknown for bindings
There are nearly hundred of cmds, I think multiple bindings are not suitable. Also the onPush callback is likely to set for once, and respond for all potential cmd subs.
View ArticleI'm confused with unknown for bindings
This might be a good use for an unboxed variant type.
View ArticleComing back to ReScript!
I’ve been using the copilot instruction files with pretty good results, and you can make it grab the llm.txt for any res file automatically like this: --- applyTo: '**/*.res' ---...
View ArticleI'm confused with unknown for bindings
Well, the current documentation around unknown is not very helpful, unknown is pretty much a dead end unless you actually parse it. It’s not a great fit for bindings to functions where you actually...
View ArticleI'm confused with unknown for bindings
Yes, different cmds’ response mapped to a protobuf definition. I think unbox might be the solution? Seems I need to parse it every time.
View ArticleI'm confused with unknown for bindings
I just found to parse every cmd’s response is verbose and massive work. It also seems unnecessary since I have already defined every cmd’s response type(according to protobuf). I’m looking for...
View ArticleI'm confused with unknown for bindings
Ah, I made it with generic. I misused unknown, because the response data is actually NOT unknown.
View ArticleInterest in Shadcn UI?
I’m very interested in working on these bindings. Let me know how I can help and I’ll get started
View ArticleInterest in Shadcn UI?
@fabrv that’s awesome! For you and @tsnobip - I’ve started setting up some basic things. I’ll ping you once I’ve made it public and there’s something we can start working on together. I have an idea...
View ArticleExample app using Parcel, Tailwind, and React server component for a static site
I wanted to try out Parcel’s support for React server components, and it works great with ReScript! Here’s a quick demo app: GitHub - jderochervlk/rescript-parcel-example It’s using the latest...
View ArticleExample app using Parcel, Tailwind, and React server component for a static site
rsc support in Parcel is also still in beta, so it’s bleeding edge all the way but it’s already tempting to switch my blog over to it as there is also support for MDX built-in. Although I should first...
View ArticleInterest in Shadcn UI?
I am interested in Shadcn bindings too and I am available to help getting the project going.
View ArticleWriting a codemod to migrate ReactDOM.Style.make calls to style records
Hello @tsnobip After waiting for the right moment to have enough time to focus on the issue, and playing around quite a lot (and pulling the last strands of hair), I’ve manage to make this gist
View ArticleWriting a codemod to migrate ReactDOM.Style.make calls to style records
Wow that looks great! Thanks a lot @remitbri!
View ArticleInterest in Shadcn UI?
Hoping to have something ready for collaboration this weekend or early next week!
View ArticleIonic Rescript bindings
Hi everyone! I want to announce Ionic bindings for Rescript. GitHub - fabrv/rescript-ionic: Ionic bindings for Rescript I’m currently working on a big migration to Rescript for a last-mile delivery...
View ArticleConsole.log with return value
Hey, recently I wrote some function pipelines and wanted to debug the output. Example: props.value ->Array.filter(item => item.id !== id) ->Array.map(item => item.id) ->Array.join(",")...
View Article