ReScript is a robustly typed language that compiles to efficient and human-readable JavaScript. It comes with one of the fastest build toolchains and offers first class support for interoperating with ReactJS and other existing JavaScript code.
Our Philosophy
ReScript is a language about shipping products, and we take pride for good UI and UX.
About the Forum
This is a friendly place for all kinds of questions and topics related to ReScript, this includes:
General / Beginner Questions (no formal structure required)
Q&A like topics (please use the “Solved” button on a reply if it solves your problem)
Feedback / Suggestions
Product Design topics
HTML / CSS / JavaScript topics
It’s important to emphasize that there are no silly questions, just create a new topic in the right category and the team and community is happy to chime in!
Code of Conduct
Please be sure to read and comply to our Code of Conduct. Keep discussions professional and friendly!
There is a somewhat recent book: Introducing ReScript: Functional Programming for Web Applications | SpringerLink
The content is already a bit outdated though. Most notably there is no async/await, it is using the old standard libraries which are in the process of getting superseded by ReScript Core and it utilizes auto-currying a bit, which is not the default behaviour since ReScript 11.
I also want to highlight a more recent video course by @Exegetech here:
Last, but not least: use this forums search function (or just google) and if you don’t find an answer don’t hesitate to start a new forum thread and ask a question!
hello there!
i am trying to get input from the command line from nodejs but i can’t seem to make it work.It telling me my type is option<'a> but this function argument is expecting type string
let result = switch input {
| Some(arg) =>
switch Belt.Int.fromString(arg) {
| Some(year) =>
let leapYear = isLeapYear(year)
let message = if leapYear {
`${year} is a leap year`
} else {
`${year} is not a leap year`
}
Js.log(message)
| None => Js.log("Invalid year input")
}
| None => Js.log("No year input provided")
}