Custom data-attributes in JSX
Here are some docs for the generic JSX transform: JSX | ReScript Language Manual One thing to add is that you don’t need to use hyphens to make that work, you can use @as: type props = {...
View ArticleCustom data-attributes in JSX
Thank you very much for the information, it helped me a lot! By the way, when is the planned release of version 11.1?
View ArticlePreact signals-react bindings (basic)
Well, I wanted to see what all the noise was about regarding signals but the options for integrating into ReScript seemed sparse. There are the issues with SolidJS that have been discussed in other...
View ArticleModular integer division operator?
Must have been a case of “great minds think alike” then.
View ArticleCan I safely communicate with serialzed variants?
I found it to be a HUGE win to communicate between a web apps frontend and backend using ordinary variants. So far I haven’t encountered any problems, but I’m wondering if there could be any issues....
View ArticlePreact signals-react bindings (basic)
Nice work! I’m not up to date on signals - what’s stopping us from using it directly with Preact in ReScript? Is the “only” issue the same issues as with Solid, that the compiler can output code that...
View ArticleCan I safely communicate with serialzed variants?
Since v11, the runtime representation of variants is stable and part of the language, so in those terms it’s safe to use variants - we won’t be changing their runtime representation. As to whether...
View ArticleCan I safely communicate with serialzed variants?
I’d definitely recommend to use a (de)serializer/validator lib, it’s just way to easy to forget about the rules of JSON and slip an undefined, a date or a function inside those variants! It just took...
View ArticleCan I safely communicate with serialzed variants?
The JSON serialization piece is a big thing to keep in mind. I’ve been hitting that with Remix. It’s fine with strings and numbers, but dates get converted to strings. It would be nice to have a way...
View ArticleError compiling @rescript/core with Rescript 11
Hello! I was updating a project of mine to Rescript 11 and got this error: [@jihchi/vite-plugin-rescript] rescript: [198/217] src/Core__List.cmj FAILED: src/Core__List.cmj We've found a bug for you!...
View ArticlePreact signals-react bindings (basic)
Hey, @kay-tee I also liked the idea of signals that Preact brought, so I also did write bindings to it: GitHub GitHub - ashton/rescript-preact-signals Contribute to ashton/rescript-preact-signals...
View ArticleJs.Re.captures is recognized a curried function, whereby not compile
Hi, I am new to rescript. I have encounter a problem when trying to use Js.Re.captures with Option.map. I have attach an example below. The compiler complains that Js.Re.captures is a curried...
View ArticlePreact signals-react bindings (basic)
One small thing you could change - currently, the actual type of the signal isn’t carried with the typings, so getValue/setValue is essentially any . By adding a type parameter to Signal.t and using...
View ArticlePreact signals-react bindings (basic)
ashton: GitHub - ashton/rescript-preact-signals Nice, you’re a lot farther along. I haven’t played around with it yet but I have to imagine it works fine because the signatures are the same (for the...
View ArticleJs.Re.captures is recognized a curried function, whereby not compile
hilaolu: Example let filename2length = name => { let match = %re("/(\d+)([A-Za-z]+)/")->Js.Re.exec_(name) Option.map(match, Js.Re.captures)->ignore None } In your 2nd function, you passed...
View ArticleJs.Re.captures is recognized a curried function, whereby not compile
Thank you for your explanation. But I am still not clear why a “_” make a difference, isn’t Js.Re.captures receive the only one argument, as documented in its signature?
View ArticleJs.Re.captures is recognized a curried function, whereby not compile
The underscore here is a placeholder that tells ReScript I need an argument but I can’t give you a variable or the compiler will yell at me. For a more professional explanation you can read about it...
View ArticleDebug mode with rescript 11.0
I understand. It would be nice if we could format logs from rescript the way rescript would rather than javascript similar to what the Elm debug helper extension for Chrome does it....
View Article