Skip to content

Commit

Permalink
Update API overview page
Browse files Browse the repository at this point in the history
  • Loading branch information
cknitt committed Jan 11, 2024
1 parent 4735221 commit 60413f8
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions pages/docs/manual/latest/api.mdx
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
# Overview

## New Standard Library
## ReScript Core

[ReScript Core](api/core) is ReScript's new standard library. It replaces the complete `Js` module as well as some of the more frequently used modules from `Belt` and is recommended to use with uncurried mode.
[Core](api/core) is ReScript's new standard library. It replaces the complete `Js` module as well as some of the more frequently used modules from `Belt` and is recommended to use with uncurried mode.

## Other Modules
In ReScript 11, it is shipped as a separate npm package `@rescript/core` that is added to your project as per the [installation instructions](http://localhost:3000/docs/manual/latest/installation). In future ReScript versions, it will be included with the `rescript` npm package itself.

ReScript ships 3 modules in its standard library.
## Additional Libraries

- [Js](api/js): bindings for all your familiar JavaScript APIs.
- [Belt](api/belt): extra collections and helpers not available in JavaScript.
- [Dom](api/dom): Dom related types and modules.
ReScript ships with these two additional modules in its standard library:

Usage heuristics:
- [Belt](api/belt): immutable collections and extra helpers not available in JavaScript / [Core](api/core).
- [Dom](api/dom): Dom related types and modules. Contains our standardized types used by various userland DOM bindings.

- Default to using the `Js` module. Most of the APIs in it are runtime-free and compile down to clean, readable JavaScript, which is our priority.
- For other APIs that aren't available in regular JavaScript (and thus don't exist in our `Js` bindings), use Belt. For example, prefer `Js.Array2` over `Belt.Array`.
- The `Dom` module contains our standardized types used by various userland DOM bindings. Due to the complexity of DOM, we don't mind that you ignore this module and build your application-specific DOM bindings.
## Legacy Modules

**Note**: we do not recommend other userland standard library alternatives (unless it's DOM bindings). These cause confusion and split points for the community.
The [Js](api/js) module is superseded by [Core](api/core).

0 comments on commit 60413f8

Please sign in to comment.