Introduction

Stdlib

Stdlib is ReScript's built-in standard library. It contains just what you need for day-to-day programming in ReScript and covers most of the built-in JavaScript API along with extra functions that work well in ReScript. When possible it will compile directly to the equivalent JavaScript API, for example [1, 2, 3]->Array.map(a => a + 1) compiles to [1, 2, 3].map(a => a + 1).

Additional Libraries

  • WebAPI: Experimental, but we expect it to be stable very soon. Similar to how the Stdlib allows interacting with move of the JavaScript API this library allows you to work with Web APIs like fetch, navigator, localStorage, etc...

  • Belt: Immutable collections and extra helpers not available in JavaScript / Stdlib.

  • Dom: Deprecated DOM-related types and modules. You should use the WebAPI library instead.