-
-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
9 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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). |