Whats wrong with this use of @unwrap?
In this example ReScript Documentation ReScript Playground Try ReScript in the browser I was expecting the output to be just as: “abc” but instead I am getting as: { NAME: “Str”, VAL: “abc” } What’s...
View ArticleWhats wrong with this use of @unwrap?
The docs say that @unwrap is only for external function arguments. Ive been hit by the same thing. I havnt caught up with the latest language versions so things may be getting better in this area...
View ArticleWhats wrong with this use of @unwrap?
You might actually be looking for @unboxed: Variant | ReScript Language Manual What are you trying to do?
View ArticleWhats wrong with this use of @unwrap?
Didn’t know it was only for external thanks. I actually was using it for writing a binding to a component. See my next reply.
View ArticleWhats wrong with this use of @unwrap?
@unboxed is what I use at the moment but I am curious why @unwrap doesn’t work. I was trying to write a binding to headlessui TabGroup component and was experimenting with how best to type the “as”...
View ArticleWhats wrong with this use of @unwrap?
Then if you use it with an external, @unwrap should work. You could actually also use @unboxed in this case. Or just write two different bindings, one with string the other one with component.
View ArticleWhats wrong with this use of @unwrap?
I make an example to demonstrate the @unwarp issue here ReScript Playground
View ArticleWhats wrong with this use of @unwrap?
I think it never worked with JSX. JSX 3 gives you an error right away: ReScript Playground and I suppose it was never implemented for JSX4, possibly because there is now @unboxed
View ArticleWhats wrong with this use of @unwrap?
yes indeed, it doesn’t work with JSX because under the hood it’s not really a function parameter but an object field. I’d recommend to use @unboxed here. ReScript Documentation ReScript Playground Try...
View ArticleRedefining the React children prop and its behavior in a binding
Hello, I was creating a binding to a JS React component library which requires an array of children even when there is one single child. How can I redefine the children prop in the binding so that the...
View ArticleVariant with generic "mysterious" behaviour
@fham this is an amazing page! Thank you for sharing!
View ArticleRedefining the React children prop and its behavior in a binding
That’s not possible unless you explicitly type it as an array of React.elements and end up with a slightly more inconvenient API. ReScript Documentation ReScript Playground Try ReScript in the browser
View Article[ANN] RescriptRelay v3 is released
RescriptRelay, a framework marrying Meta’s GraphQL client Relay with ReScript, has finally had version 3 reach stable. Version 3 is as powerful as ever, and leverages a large number of new powerful,...
View Article[ANN] RescriptRelay v3 is released
Been using it for about 6 months now, since the first alpha releases I can attest it is incredible, especially when paired with the router. Chose it for my newest project, alongside your other tools...
View Article[ANN] RescriptRelay v3 is released
I’ve been using rescript relay and its router for years and I can say it’s only getting better and better! It’s just the perfect combo for the frontend. Awesome work @zth!
View ArticleFirebase modular bindings
I have continued my project with Firebase and ReScript. The project itself is private but I’m putting my bindings over on GitHub - nojaf/rescript-firebase It is only a subset for now but eventually I...
View ArticleFirebase modular bindings
There seems to be an error in your repo, Firebase.res looks like a broken symlink.
View ArticleFirebase modular bindings
Hmm, it is a symlink to my project file in private project. I’ll look into it.
View Article