A collection of awesome things about the ReScript programming language and toolchain. Inspired by the awesome list thing. Contributions are always welcome.
NOTE: This repository is mainly for ReScript materials where the source code is ReScript (.res
and .resi
files). For materials written in ReasonML, please use the awesome-reasonml repository.
- Official Forum
- Post your questions mainly here, the ReScript core team is there to answer them.
- Official Twitter
- ReScript Subreddit
- ReScript Telegram Channel
A lot of posts can be found via the #rescript tag on dev.to. So please check first, if a post is also there to keep this list small. Roughly sorted from newest to oldest. But some posts have no date, get updated sometimes or are collection links.
- ReScript for React Development by @mishaszu
- A Journey from JavaScript and TypeScript, to Rescript/React, via Elm, OCaml & Haskell.
- Ongoing list of Rescript articles by @dusty-phillips
- Rewriting a Project in ReScript by @yangdanny97
- Responsive images and cumulative layout shift by @alexfedoseev
- Lazy Loading Images With ReScript by @alexfedoseev
- Type-safe bindings in ReScript by @benadamstyles
- Cool Things You Can Do with First-Class Modules in ReScriptReact by @alexfedoseev
- Safe Routing in ReScript by @alexfedoseev
- 2021/04 - @tom-sherman - NorfolkDevelopers - Should you consider ReScript over Typescript for your next project?
- 2020/10 - @IwanKaramazow and @serras - 47 Degrees - Immutable Conversations - ReScript
ReScript Package Index
To discover libraries and bindings for ReScript, please use the official package index tool. Libraries with the rescript
keyword in their package.json
will appear there, as well as manually added resources. If you happen to find no bindings for a library, please ask for it on the forum. Chances are that somebody already wrote them, but kept them private, because maintaining a full set of bindings is always harder than tweaking them to one's specific needs.
(also refer to the official site)
The official snippets included with the ReScript-VSCode extension are available here. You don't need to do anything to activate them; the extension already installs them.
But you can also add your snippets if you want to. You can add them as user snippets or in a workspace through a rescript.code-snippets
file in the .vscode
folder in the root of your workspace / project. See an example of some user snippets here. Read more about snippets in VSCode here.
If you're coming to ReScript React from other languages, you probably find yourself writing React.string("")
quite a lot, but maybe sometimes forgetting to add the React.string
call.
Luckily, VSCode has support for adding custom keybindings. If you open your keybindings.json
and add the following, you can select any piece of code and press cmd+k
followed by s
to add the React.string
call around the selection:
{
{
"key": "cmd+k s",
"command": "editor.action.insertSnippet",
"when": "editorTextFocus",
"args": {
"snippet": "{React.string(\"$TM_SELECTED_TEXT\")}"
}
}
...rest of your keybindings.json
}
Change the keybinding to your liking. Read more about keybindings in VSCode here.
- ReScript Game of Life - Conway's Game of Life written in ReScript using ReScript-React. (demo)
- ReScript RealWorld example app - Another Medium.com clone written using ReScript-React
- ReTurbo - Pseudo 3D racing game built with Reprocessing (demo)
- Coronate - A Swiss-style chess tournament manager for the web and desktop, written with ReScript-React. (web demo)
- Pomodoro - Simple pomodoro application. Written in ReScript and ReactJS. (demo)
- rescript-intro - A calculator Using ReScript, React + Tailwind.
Just fork this repository and add your resources in a pull-request. Please check for duplicates and dead links before you submit.
NOTE: This repository is mainly for ReScript materials where the source code is ReScript (.res
and .resi
files). For materials written in ReasonML, please use the awesome-reasonml repository.