Learn how to write rescript bindings for a react library


They are also called Ports in Elm language.

Ports in Elm are way different. In ReScript, the bindings syntax is specifically designed to allow seamless interop with JavaScript, whereas in Elm, everything needs to run through the ports architecture, which requires a lot of extra serialisation and extra runtime overhead.

ReScript bindings are just an unsafe direct-access mechanism to the JS world. There’s no portal; just some external declarations and some type definitions.

1 Like

thank you. I’ve updated the post.

1 Like