Spread incoming type in module function
I use ReScript Schema for this. See data in the Stripe integration I recently built GitHub - enviodev/rescript-stripe: 💸 Stripe Billing as a Config The data is a wrapper around S.object schema which...
View ArticleI might make a video on React component in ReScript
Hello, As a bit of an exercise I’d like to make a YouTube video on how React components in ReScript work. I’m not sure if I’m actually going to do it, but content creation does interest me from time...
View ArticleI might make a video on React component in ReScript
I have only dabbled with ReScript so far and one of my first attempts was trying to extend the props of a react component. Firstly, by the approach that you plan to cover, i.e. spreading the existing...
View ArticleI might make a video on React component in ReScript
Could you provide an example of how to extend JsxDOM.domProps? I’m not sure I understand.
View ArticleI might make a video on React component in ReScript
It is basically what @tsnobip outlined here
View ArticleSecure routes with RescriptReactRouter
I’m considering using Router | React because it fits my basic needs. However, I have one requirement: certain routes should require a user to be authenticated. How could I achieve this? I would guess...
View ArticleI might make a video on React component in ReScript
I see, so when you don’t control the component (like the <button> in the standard library), you can extend it. Thanks for bringing this up!
View ArticleI might make a video on React component in ReScript
We could make this configurable for the React PPX as well. I think this has been requested before. We could add a setting to the JSX config, like "domProps": "MyDOMProps.t". Then it’d be easy to just...
View ArticleI might make a video on React component in ReScript
This would be really great. I want to use the popover attribute quite often but am too lazy to overwrite the whole jsx stuff. My workaround is by using a ref and setAttribute in a useEffect hook. But...
View ArticleI might make a video on React component in ReScript
It would make sense to create a PR to add popover and popoverTarget to the dom props indeed in this case!
View ArticleUsing turbo (turborepo) with ReScript and caching node_modules/**/*
Apologies for reviving an old post, but this discussion seems highly relevant to my issue, and I thought it would be better to continue here rather than creating a new thread. We recently converted...
View ArticleI might make a video on React component in ReScript
Yes definitely, that’s the real solution to that particular problem. The config would be: An escape hatch so you’re never blocked When you need to add non-standard things like binding to data-...
View ArticleI might make a video on React component in ReScript
With some cheating you can also do this: ReScript Documentation ReScript Playground Try ReScript in the browser Depending on how much you need this, this might be easier instead of overriding domProps.
View ArticleExtending JsxDOM.domProps
Thinking about to create a PR to add some standard html attributes to the props type. Since there are two different types (ReactDOM.domProps and JsxDOM.domProps) I don’t know which one is the right...
View ArticleSecure routes with RescriptReactRouter
I was looking into using this for a project: Remix Auth | Remix Resources
View ArticleUsing turbo (turborepo) with ReScript and caching node_modules/**/*
Have you looked into Rewatch? GitHub - rescript-lang/rewatch: Rewatch is an alternative build system for the Rescript Compiler.
View ArticleSecure routes with RescriptReactRouter
Absolutely, I can explore a framework to address this. I’m really looking for information on the options available with the simple router included in the ReScript bindings.
View Article