JS JSX -> ReScript JSX converter?
That’s awesome! First 2 things that came to my mind: browser extension to transform all JSX examples on websites to ReScript, and a CLI tool to convert files.
View ArticleJS JSX -> ReScript JSX converter?
Hmm, it uses web assembly so I’m not quite sure if that would work. Converting entire files would not be that useful as it merely tweaks JSX stuff right now.
View ArticleJS JSX -> ReScript JSX converter?
I have so many questions after looking at the github. From what I can tell you are using oxc to parse the JSX and then transforming the output to ReScript. Couldn’t that be done without webassembles?...
View ArticleJS JSX -> ReScript JSX converter?
Yes, the oxc component is their Rust code compiled to WebAssembly. It could potentially be replaced with a pure JavaScript parser, which may open more opportunities. Your line of thinking is on the...
View ArticleSecure routes with RescriptReactRouter
I currently am going with It looks great for my needs! Please feel free to let me know if you think any improvements are necessary.
View ArticleSecure routes with RescriptReactRouter
I think it’s a good approach, but you probably don’t want to render children unless auth store is valid as well.
View ArticleBindings: to create or reuse
I’ve recently started writing some bindings for a project. Specifically, I’m targeting the popular TanStack Query. Since it’s quite popular, there are already some existing bindings on GitHub. I’m...
View ArticleBindings: to create or reuse
I usually reuse them, copy paste some base and tailor them for my use case. Copilot generates correct bindings 95% of the time anyway and this allows to have simpler bindings. But yeah, this prevents...
View ArticleBindings: to create or reuse
Outside of rescript react and core, I don’t think we’ve ever installed any other community bindings. We just write our own bindings when we need them. Few reasons I can think of: Always worried that...
View ArticleUsing react-spring and use-gesture, how would you approach it?
https://www.react-spring.dev/ https://use-gesture.netlify.app Hello. I’m looking to use these two libraries in a rescript side project that I’m doing. And I’m wondering how you would guys approach it....
View ArticleUsing react-spring and use-gesture, how would you approach it?
joakin: I was thinking, maybe starting to use it in the application by embedding pieces of JS with raw, just to get an idea of how it could work and what I actually want to do before writing any...
View ArticleIntroducing Bibimbob: VSCode Extension for ReScript Dependency Visualization
Hi, Just wanted to share a tool I built: Bibimbob - a VSCode extension that visualizes module dependencies in your ReScript projects. What does it do? Bibimbob shows you how your ReScript modules...
View ArticleBindings: to create or reuse
I generally just write my own bindings for most things. I usually just need a function or two, plus I am doing stuff with Deno these days so I prefix stuff with jsr: or npm:.
View ArticleIntroducing Bibimbob: VSCode Extension for ReScript Dependency Visualization
This looks awesome but didn’t work for me I assume it has to do with the fact I’m using rewatch?
View ArticleIntroducing Bibimbob: VSCode Extension for ReScript Dependency Visualization
Very nice! I always had this idea but never came around to do it myself. IMO at some point rewatch should do it since it has probably all the necessary information to even display the graph over...
View ArticleUsing react-spring and use-gesture, how would you approach it?
If I am not sure if I want to use something I’ll make a JS file that imports it and then write bindings for that file. For example, let’s say I wanted to wrap some children in a react springs...
View ArticleBindings: to create or reuse
I’m targeting the popular TanStack Query Interesting you mention that, I vendor’d the rescriptbr ones because they had a few mistakes in them. I’d recently started working on binding them for v5 using...
View ArticleBindings: to create or reuse
Always worried that the bindings I find on someone’s github has partial coverage and may be missing something we need. Without the ability to extend, you end up with like Express2.res files that have...
View ArticleIntroducing Bibimbob: VSCode Extension for ReScript Dependency Visualization
Very cool! However I also have a yarn workspace project (not with rewatch though) and it’s not displaying any info for me.
View ArticleIntroducing Bibimbob: VSCode Extension for ReScript Dependency Visualization
I haven’t tested this with rewatch yet. Would you be able to open an issue? It would be helpful if you could include some basic information about your project structure. GitHub GitHub -...
View ArticleIntroducing Bibimbob: VSCode Extension for ReScript Dependency Visualization
I haven’t had a chance to test with yarn workspaces either. It’s likely a path issue that shouldn’t be too difficult to fix.
View ArticleIntroducing Bibimbob: VSCode Extension for ReScript Dependency Visualization
Thank you! I hadn’t considered rewatch and monorepo setups. I’ll work on addressing these in a future version.
View ArticleIntroducing Bibimbob: VSCode Extension for ReScript Dependency Visualization
I created a very simple project, built it with rewatch, and tested it - it seems to work as intended. Are you perhaps using rewatch in a monorepo setup?
View ArticleIntroducing Bibimbob: VSCode Extension for ReScript Dependency Visualization
Yeah, rewatch with pnpm workspaces similar to this sample repo - GitHub - hellos3b/rewatch-pnpm: Sample project for using rewatch with pnpm workspaces
View ArticleIntroducing Bibimbob: VSCode Extension for ReScript Dependency Visualization
Thanks, I’m struggling to setup the monorepo with rewatch actually. It would be much helpful to fix the issue.
View ArticleIntroducing Bibimbob: VSCode Extension for ReScript Dependency Visualization
I cloned the shared pnpm_workspace repository and tried to build it according to the README instructions, but I’m encountering errors. How should I manage dependencies and orchestrate the build...
View ArticleIntroducing Bibimbob: VSCode Extension for ReScript Dependency Visualization
fham: IMO at some point rewatch should do it since it has probably all the necessary information to even display the graph over package boundaries. Yes, this should be some sort of dump command from...
View ArticleIntroducing Bibimbob: VSCode Extension for ReScript Dependency Visualization
@jfrolich has talked about an RPC-style interface to Rewatch. Maybe this would be a good first feature candidate.
View ArticleIntroducing Bibimbob: VSCode Extension for ReScript Dependency Visualization
I’ve identified that the issue in monorepos appears to be related to path resolution. If you open your IDE at the package or app root level within the monorepo, the dependency information should...
View ArticleIntroducing Bibimbob: VSCode Extension for ReScript Dependency Visualization
OH yeah sorry, was on mobile last night but that repo was created specifically for reproducing that issue in rewatch with pnpm. Just thought it’d help showcase project structure If it’d help, I know...
View ArticleIntroducing Bibimbob: VSCode Extension for ReScript Dependency Visualization
Other loose ideas on this topic (do with it what you will): Sort nodes on the most vs least dependencies Filter nodes on least/max amount of dependents and/or dependencies Highlight all paths to a...
View ArticleIntroducing Bibimbob: VSCode Extension for ReScript Dependency Visualization
Thanks for the ideas. I agree that sort and filter are essential features that I’ve been thinking about too. And to add a few more suggestions: Showing unused props for React component modules...
View ArticleBindings: to create or reuse
That said, it’d be pretty convenient if the compiler could pick up some metadata from package.json of installed packages instead of relying on manually syncing these Honestly, this can actually be...
View ArticleBindings: to create or reuse
Btw, there’s SWR support in rescript-rest, which can be a good alternative to TanStack Query. GitHub GitHub - DZakh/rescript-rest: 😴 ReScript RPC-like client, contract, and... 😴 ReScript RPC-like...
View ArticleIntroducing Bibimbob: VSCode Extension for ReScript Dependency Visualization
@hellos3b @fham @illusionalsagacity I released version v0.5.0 which supports monorepos. After some investigation, it seems that ReScript projects have slightly different monorepo structures. For...
View ArticleBinding to union types in record fields in JS/TS
Hey, as a continuation to Using react-spring and use-gesture, how would you approach it? I have been investigating ways to represent the record fields for the configuration which are usually TS unions...
View ArticleBinding to union types in record fields in JS/TS
Broadly speaking, I’d go with option 1. However, one important thing to remember is this: you don’t have to bind to all available values. For example, per gesture’s docs, passing a Delay of true is...
View ArticleBinding to union types in record fields in JS/TS
That is really good advice, I’ve been looking at the different options and with that in mind most of the union types provided for convenience/sugar just go away by providing the canonical version,...
View ArticleIntroducing Bibimbob: VSCode Extension for ReScript Dependency Visualization
Cool! It works now to display the sub-projects of rescript-mui but the “Focus on module dependencies” still does not work. Here is the repo: GitHub - cca-io/rescript-mui: ReScript bindings for MUI I...
View Article