ReScript React Docs Busted
Mea maxima culpa! I broke it when I added some better version handling for the main docs. Works again now.
View ArticleUsing js-post-build to rename custom files to page.js for NextJs Projects
Hi Everyone!! So I wanted to build a project using NextJs + Rescript, but the issue is that in rescript you can’t have the same file name, which conflicts with the NextJs folder structure (wherein...
View ArticleUsing js-post-build to rename custom files to page.js for NextJs Projects
Found a thread with a similar idea: Using React server/client components with Rescript (React 18/NextJS 13) - #2 by PolyDevil
View ArticleUsing js-post-build to rename custom files to page.js for NextJs Projects
Thanks, but I had already gone through this. I’m getting an error when I try to add the js-post-build config. When I’m removing this config then its compiling successfully. Can you please help me with...
View ArticleUsing js-post-build to rename custom files to page.js for NextJs Projects
An update, noticed this problem is happening only on windows. I tried this in wsl and masOS and it was working fine. And the script to rename the file to page.res.js: #!/ bin/bash #Check if the...
View ArticleUsing js-post-build to rename custom files to page.js for NextJs Projects
What kind of script did you use on windows? Because yes, bash does not work there. I think the few ppl that use it use it with node scripts.
View ArticleCustom data-attributes in JSX
In the Playground you linked to, there is a binding: @module("react/jsx-runtime") external jsxs: (string, props) => Jsx.element = "jsx" Did you mean to write = "jsxs" instead of = "jsx"? The...
View ArticleApplying good ideas to Rescript documentation
On the documentation page for the Svelte framework, you can find an interesting section dedicated to LLMs (link) In short, you can open in text form the entire documentation of the framework, which is...
View ArticleHow can I use a library (@rescript/webapi) in a project?
I am trying to use the @rescript/webapi library, but I can’t quite get it to work. I’ve had issues with other libraries as well. I have a ReScript project set up and working. In order to use...
View ArticleHow can I use a library (@rescript/webapi) in a project?
Hello, what version of ReScript are you using? Because the experimental webapi is targeting the v12 alphas. This won’t work if you use ReScript 11. And if the v11 versus v12 is not your problem, you...
View ArticleApplying good ideas to Rescript documentation
That makes a lot of sense so I created an issue. Everybody is free to contribute btw.
View ArticleWhy is this wrapper function created?
Playground: @module("./math.js") external sum: (int, int) => int = "sum" let result = sum(3, 4) import * as MathJs from "./math.js"; function sum(prim0, prim1) { return MathJs.sum(prim0, prim1); }...
View ArticleWhy is this wrapper function created?
Looks like it only happens when the @module points to a local file.
View ArticleHow can I use a library (@rescript/webapi) in a project?
Ah, that must be at least part of the problem. I’m using version 11.1.4.
View ArticleRescript@v12.0.0-alpha.6 - Compiler Assertion when comparing `null` with...
Happens in rescript@v12.0.0-alpha.6 but NOT in rescript@v11.1.6 let a = null let b = undefined let res = a != b yields Unexpected Error File "compiler/core/js_exp_make.ml", line 1756, characters...
View ArticleRescript@v12.0.0-alpha.6 - Compiler Assertion when comparing `null` with...
Good catch, could you create an issue in the compiler repo?
View ArticleRescript@v12.0.0-alpha.6 - Compiler Assertion when comparing `null` with...
done. here is the issue https://github.com/rescript-lang/rescript/issues/7225
View ArticleExperimentation with simplifying pipe autocompletion
This is now available in the pre-release channel for the VSCode extension, and will ship in stable as soon as it has been tested for a bit. Here’s a series of tweets explaining it:...
View Article