open-index/open-npm huggingface dataset:
npm package: @rescript/react
Description: React bindings for ReScript
Author: Ricky Vetter
Latest version: 0.14.2

## @rescript/react

> The Official [ReScript](https://rescript-lang.org) Bindings for [ReactJS](https://react.dev/)

- [Introduction](https://rescript-lang.org/docs/react/latest/introduction)
- [Installation](https://rescript-lang.org/docs/react/latest/installation)

### Versions

| @rescript/react | ReScript                           | ReactJS | Documentation                                                     |
| --------------- | ---------------------------------- | ------- | ----------------------------------------------------------------- |
| 0.14.x          | 11.0+ (JSX4 + uncurried mode only) | 19      |                                                                   |
| 0.12.x, 0.13.x  | 11.0+                              | 18      | [Link](https://rescript-lang.org/docs/react/latest/introduction)  |
| 0.11.0          | 10.1                               | 18      | [Link](https://rescript-lang.org/docs/react/v0.11.0/introduction) |
| 0.10.3          | 8.3                                | 16.8.1+ | [Link](https://rescript-lang.org/docs/react/v0.10.0/introduction) |

### Development

```
npm install

# Starts the ReScript compiler in watch mode
npm start
```

### Acknowledgements

This project is the next evolution of the original [reason-react](https://github.com/reasonml/reason-react) bindings.
npm package: @rescript/tools
Description: ReScript Tools
Author: ReScript Team
Latest version: 0.6.6

# ReScript Tools

## Install

```sh
npm install --save-dev @rescript/tools
```

## CLI Usage

```sh
rescript-tools --help
```

### Generate documentation

Print JSON:

```sh
rescript-tools doc src/EntryPointLibFile.res
```

Write JSON:

```sh
rescript-tools doc src/EntryPointLibFile.res > doc.json
```

### Reanalyze

```sh
rescript-tools reanalyze --help
```

## Decode JSON

Add to `bs-dev-dependencies`:

```json
"bs-dev-dependencies": ["@rescript/tools"]
```

```rescript
// Read JSON file and parse with `Js.Json.parseExn`
json->RescriptTools.Docgen.decodeFromJson
```
npm package: @rescriptbr/radix-ui
Description: <p align="center">   <img src="./assets/cover.svg" />   <br /> </p>
Latest version: 1.3.0

<p align="center">
  <img src="./assets/cover.svg" />
  <br />
</p>

# ReScript Radix UI

[Radix UI](https://www.radix-ui.com/) bindings for ReScript.

## Installation

1. Install `@rescriptbr/radix-ui` using npm/yarn:

```
npm install --save @rescriptbr/radix-ui
```

or yarn:

```
yarn add @rescriptbr/radix-ui
```

2. Add `@rescriptbr/radix-ui` as dependency to your `bsconfig.json`:

```json
{
  "name": "your-project",
  "bs-dependencies": ["@rescriptbr/radix-ui"]
}
```

## Contributing

If you'd like to contribute, you can follow the instructions below to get things working locally.

### Getting Started

1. After cloning the repo, install the dependencies

```
yarn install
```

2. Build:

```
yarn re:build
```

3. If you're running the example, in other terminal run:

```
yarn start
```
npm package: @rescriptbr/react-flow
Description: Easily use React Flow with ReScript
Author: Diogo Mafra
Latest version: 0.1.2

<p align="center">
  <img src="./assets/logo.svg" /> 
  <br />
</p>

# ReScript React Flow

[React Flow](https://reactflow.dev/) bindings for ReScript.

## Installation

1. Install `rescript-react-flow` using npm:

```
npm install --save @rescripbr/react-flow
```

or yarn:

```
yarn add @rescriptbr/react-flow
```

2. Add `rescript-react-flow` as dependency to your `bsconfig.json`:

```json
{
  "name": "your-project",
  "bs-dependencies": ["@rescriptbr/react-flow"]
}
```

# Examples

Check the code below for fast basic examples:

#### Creating a simple Node

```rescript
 ReactFlow.Types.Node(
    ReactFlow.Node.makeNode(
      ~id="1",
      ~position={x: 250, y: 0},
      ~data=ReactFlow.Node.toData({"label": React.string("test")}),
      ~type_="input",
      (),
    ),
  ),
```

#### Creating a simple Edge

```rescript
ReactFlow.Types.Edge(
    ReactFlow.Edge.makeEdge(
      ~id="e1-2",
      ~source="1",
      ~target="2",
      ~label="this is an edge label",
      ~data=ReactFlow.Edge.toData("some other data"),
      (),
    ),
  ),
```

#### Creating elements array

```rescript
let elements = [
  ReactFlow.Types.Edge(
    ReactFlow.Edge.makeEdge(
      ~id="e1-2",
      ~source="1",
      ~target="2",
      ~label="this is an edge label",
      ~data=ReactFlow.Edge.toData("some other data"),
      (),
    ),
  ),
  ReactFlow.Types.Node(
    ReactFlow.Node.makeNode(
      ~id="1",
      ~position={x: 250, y: 0},
      ~data=ReactFlow.Node.toData({"label": React.string("test")}),
      ~type_="input",
      (),
    ),
  ),
]
```

#### Rendering React Flow

```rescript
@react.component
let make = () => {
  let (elems, setElems) = React.useState(() => elements)
  let onElementsRemove = elementsToRemove => {
    setElems(elems => ReactFlow.Utils.removeElements(elementsToRemove, elems))
  }

  let onConnect = newEdgeParams => {
    setElems(elems => ReactFlow.Utils.addEdge(newEdgeParams, elems))
  }

  <div className="App" style={ReactDOM.Style.make(~height="800px", ~width="1200px", ())}>
    <ReactFlow
      elements={elems->ReactFlow.Utils.elementsToRaw}
      onElementsRemove
      onConnect
      onLoad
      snapToGrid=true
      snapGrid=(15, 15)>
      <ReactFlow.Controls />
      <ReactFlow.Background variant=#lines color="#aaa" gap={16} />
      <ReactFlow.MiniMap
        nodeColor={n => {
          switch ReactFlow.Node.type_Get(n) {
          | Some("input") => "#0041d0"
          | Some("output") => "#ff0072"
          | Some("default") => "#1a192b"
          | _ => "#eee"
          }
        }}
        nodeStrokeColor={_ => "#fff"}
        nodeBorderRadius={2}
      />
    </ReactFlow>
  </div>
}
```

Please look at the example folder for more advanced implementations.

## Contributing

If you'd like to contribute, you can follow the instructions below to get things working locally.

### Getting Started

1. After cloning the repo, install the dependencies

```
npm install
```

2. Build and start the example server:

```
npm start
```
npm package: @rescriptbr/react-testing-library
Description: ReScript bindings for react-testing-library
Author: ReScript Brasil
Latest version: 1.0.1

# @rescriptbr/react-testing-library &middot; 

> [ReScript](https://rescript-lang.org) bindings for [react-testing-library](https://github.com/testing-library/react-testing-library).

## Documentation

The documentions is WIP, see [`src/__tests__`](src/__tests__) for some examples.

## Installation

```sh
$ yarn add --dev @rescriptbr/react-testing-library

# or..

$ npm install --save-dev @rescriptbr/react-testing-library
```

## Usage

#### Add to `bsconfig.json`

```json
{
  "bs-dev-dependencies": [
    "@rescriptbr/react-testing-library"
  ]
}
```

#### With [`bs-jest`](//github.com/glennsl/bs-jest)

```ocaml
open Jest
open Expect
open ReactTestingLibrary

test("Component renders", () =>
  <div style=ReactDOM.Style.make(~color="rebeccapurple", ())>
    <h1> {React.string("Heading")} </h1>
  </div>
  |> render
  |> container
  |> expect
  |> toMatchSnapshot
)
```

## Examples

See [`src/__tests__`](src/__tests__) for some examples.

## Development

```sh
$ git clone https://github.com/wyze/bs-react-testing-library.git
$ cd bs-react-testing-library
$ yarn # or `npm install`
```

## Build

```sh
$ yarn build
```

## Test

```sh
$ yarn test
```

## Change Log

> [Full Change Log](changelog.md)

### [v1.0.0](https://github.com/rescriptbr/react-testing-library/releases/tag/v1.0.0) (2021-04-21)

* Fix package version ([@vmarcosp](https://github.com/vmarcosp) in [5ad5ce0](https://github.com/rescriptbr/react-testing-library/commit/5ad5ce0))
* Updating changelog ([@vmarcosp](https://github.com/vmarcosp) in [d6b6178](https://github.com/rescriptbr/react-testing-library/commit/d6b6178))
* Update readme.md ([@vmarcosp](https://github.com/vmarcosp) in [40b2af2](https://github.com/rescriptbr/react-testing-library/commit/40b2af2))
* Update ci.yml ([@vmarcosp](https://github.com/vmarcosp) in [ddf3986](https://github.com/rescriptbr/react-testing-library/commit/ddf3986))
* Update readme.md ([@vmarcosp](https://github.com/vmarcosp) in [e70df4d](https://github.com/rescriptbr/react-testing-library/commit/e70df4d))
* Updating deno version on ci ([@vmarcosp](https://github.com/vmarcosp) in [4ac7cc6](https://github.com/rescriptbr/react-testing-library/commit/4ac7cc6))
* Removing unused files ([@vmarcosp](https://github.com/vmarcosp) in [3b0c09f](https://github.com/rescriptbr/react-testing-library/commit/3b0c09f))
* Migrating from reason syntax to rescript and reason-react to @rescript/react ([@vmarcosp](https://github.com/vmarcosp) in [f77a430](https://github.com/rescriptbr/react-testing-library/commit/f77a430))

## License

MIT ©
npm package: @rescriptbr/reschema
Description: Schema validation made easy for ReScript
Author: Gabriel Rubens
Latest version: 3.0.3

<p align="center">
  <img src="./assets/cover.svg" /> 
  <br />
</p>
<p align="center">
  <a href="#what-is-this-">What is this?</a> • 
  <a href="#features-">Features</a> • 
  <a href="#installation-">Installation</a> • 
  <a href="#documentation-">Documentation</a> •
  <a target="_blank" href="https://reform-demo.rescriptbrasil.org">Live demo (with ReForm)</a>
</p>
<br/>

## What is this? 💡
ReSchema is a schema builder for ReScript. We created ReSchema to be deadly simple, leveraging ReScript's powerful typesytem.
Schemas created with ReSchema are nothing more than constructors built-in in the language itself with a small size footprint.

## Features ⚡
- Schema validation using GADT's
- Built-in validators
- Type-safe validation
- I18n support
- Regex support
- Custom validations

## Installation 📦

```sh
yarn add @rescriptbr/reschema
```
and then, add `ReSchema` as a dependency in your `bsconfig.json`
```js
{
  ...
  "bs-dependencies": [
    "@rescriptbr/reschema"
  ],
}
```

## Documentation 🔎
- [Getting Started](./docs/1-getting-started.md)
- [API Reference](./docs/2-api-reference.md)
npm package: @rescriptbr/testing-library
Description: ReScript bindings for react-testing-library
Author: ReScript Brasil
Latest version: 1.0.0

# @rescriptbr/react-testing-library &middot; 

> [ReScript](https://rescript-lang.org) bindings for [react-testing-library](https://github.com/testing-library/react-testing-library).

## Documentation

The documentions is WIP, see [`src/__tests__`](src/__tests__) for some examples.

## Installation

```sh
$ yarn add --dev @rescriptbr/react-testing-library

# or..

$ npm install --save-dev @rescriptbr/react-testing-library
```

## Usage

#### Add to `bsconfig.json`

```json
{
  "bs-dev-dependencies": [
    "@rescriptbr/react-testing-library"
  ]
}
```

#### With [`bs-jest`](//github.com/glennsl/bs-jest)

```ocaml
open Jest
open Expect
open ReactTestingLibrary

test("Component renders", () =>
  <div style=ReactDOM.Style.make(~color="rebeccapurple", ())>
    <h1> {React.string("Heading")} </h1>
  </div>
  |> render
  |> container
  |> expect
  |> toMatchSnapshot
)
```

## Examples

See [`src/__tests__`](src/__tests__) for some examples.

## Development

```sh
$ git clone https://github.com/wyze/bs-react-testing-library.git
$ cd bs-react-testing-library
$ yarn # or `npm install`
```

## Build

```sh
$ yarn build
```

## Test

```sh
$ yarn test
```

## Change Log

> [Full Change Log](changelog.md)

### [v1.0.0](https://github.com/rescriptbr/react-testing-library/releases/tag/v1.0.0) (2021-04-21)

* Fix package version ([@vmarcosp](https://github.com/vmarcosp) in [5ad5ce0](https://github.com/rescriptbr/react-testing-library/commit/5ad5ce0))
* Updating changelog ([@vmarcosp](https://github.com/vmarcosp) in [d6b6178](https://github.com/rescriptbr/react-testing-library/commit/d6b6178))
* Update readme.md ([@vmarcosp](https://github.com/vmarcosp) in [40b2af2](https://github.com/rescriptbr/react-testing-library/commit/40b2af2))
* Update ci.yml ([@vmarcosp](https://github.com/vmarcosp) in [ddf3986](https://github.com/rescriptbr/react-testing-library/commit/ddf3986))
* Update readme.md ([@vmarcosp](https://github.com/vmarcosp) in [e70df4d](https://github.com/rescriptbr/react-testing-library/commit/e70df4d))
* Updating deno version on ci ([@vmarcosp](https://github.com/vmarcosp) in [4ac7cc6](https://github.com/rescriptbr/react-testing-library/commit/4ac7cc6))
* Removing unused files ([@vmarcosp](https://github.com/vmarcosp) in [3b0c09f](https://github.com/rescriptbr/react-testing-library/commit/3b0c09f))
* Migrating from reason syntax to rescript and reason-react to @rescript/react ([@vmarcosp](https://github.com/vmarcosp) in [f77a430](https://github.com/rescriptbr/react-testing-library/commit/f77a430))

## License

MIT ©
npm package: @rescripts/rescript-env
Description: ## About
Latest version: 0.0.14

# @rescripts/rescript-env

## About

Use your own Babel, ESLint and TSLint configurations. This rescript is a zero-config combination of three other rescripts:

- [@rescripts/rescript-use-babel-config](https://github.com/rescripts/rescripts/tree/master/packages/rescripts/use-babel-config)
- [@rescripts/rescript-use-eslint-config](https://github.com/rescripts/rescripts/tree/master/packages/rescripts/use-eslint-config)
- [@rescripts/rescript-use-tslint-config](https://github.com/rescripts/rescripts/tree/master/packages/rescripts/use-tslint-config)

## Installation

```sh
npm i -D @rescripts/rescript-env
```

## Usage

```json
["env"]
```

> Babel
>
> > Searches for a Babel config from your `package.json`'s `babel` field, or from files named `.babelrc`, `.babelrc.js`, `.babelrc.json` or `babel.config.js` in your root directory.

> ESLint
>
> > Searches for an ESLint config from your `package.json`'s `eslintConfig` field, or from files named `.eslintrc`, `.eslintrc.js`, `.eslintrc.json` or `eslint.config.js` in your root directory.

> TSLint
>
> > Searches for a TSLint config from files named either `tslint.js` or `tslint.json` in your root directory.
npm package: @rescripts/rescript-use-babel-config
Description: ## About
Latest version: 0.0.12

# @rescripts/rescript-use-babel-config

## About

Use your own Babel configuration. You probably want to use the Create React App babel config as a starting point:

```json
{
  "plugins": [
    [
      "babel-plugin-named-asset-import",
      {
        "loaderMap": {
          "svg": {
            "ReactComponent": "@svgr/webpack?-svgo,+titleProp,+ref![path]"
          }
        }
      }
    ]
  ],
  "presets": [
    [
      "react-app",
      {
        "runtime": "automatic"
      }
    ]
  ]
}
```

## Installation

```sh
npm i -D @rescripts/rescript-use-babel-config
```

## Usage

#### From a `.babelrc`:

```json
[["use-babel-config", ".babelrc"]]
```

> Searches for the config in your root directory.

#### From config file

Call `use-babel-config` with `.babelrc.js`, `.babelrc.json`, or any other file name (must have `.js` or `.json` extension).

```json
[["use-babel-config", "name-your-babel-config-whatever.js"]]
```

> Searches for the config from your root directory and `node_modules`.

#### From `package.json`

```json
[["use-babel-config", "package"]]
```

> Searches for the config within the `babel` field of your `package.json`.

#### Inline config

```json
[
  [
    "use-babel-config",
    {
      "presets": ["react-app"],
      "plugins": ["some-plugin"]
    }
  ]
]
```
npm package: @rescripts/rescript-use-eslint-config
Description: ## About
Latest version: 0.0.11

# @rescripts/rescript-use-eslint-config

## About

Use your own ESLint configuration.

## Installation

```sh
npm i -D @rescripts/rescript-use-eslint-config
```

## Usage

#### From a `.eslintrc`:

```json
[["use-eslint-config", ".eslintrc"]]
```

> Searches for the config in your root directory.

#### From config file

Call `use-eslint-config` with `.eslintrc.js`, `.eslintrc.json`, or any other file name (must have `.js` or `.json` extension).

```json
[["use-eslint-config", "name-your-eslint-config-whatever.js"]]
```

> Searches for the config from your root directory and `node_modules`.

#### From `package.json`

```json
[["use-eslint-config", "package"]]
```

> Searches for the config within the `eslintConfig` field of your `package.json`.

#### Inline config

```json
[
  [
    "use-eslint-config",
    {
      "extends": ["react-app"],
      "plugins": ["some-plugin"],
      "rules": {
        "some-rule": 0
      }
    }
  ]
]
```
npm package: @rescripts/rescript-use-rewire
Description: ## About
Latest version: 0.0.6

# @rescripts/rescript-use-rewire

## About

Use "rewires" made for [react-app-rewired](https://github.com/timarney/react-app-rewired).

## Installation

```sh
npm i -D @rescripts/rescript-use-rewire
```

> make sure you've also installed the rewire you wish to use

## Usage

```json
[["use-rewire", "name-of-rewire", "other arguments"]]
```

## Example

```js
module.exports = [
  [
    'use-rewire',
    'react-app-rewire-compression-plugin',
    {test: /\.js(\?.*)?$/i, cache: true},
  ],
]
```
npm package: @rescripts/rescript-use-stylelint-config
Description: ## About
Latest version: 0.0.8

# @rescripts/rescript-use-stylelint-config

## About

Use your own Stylelint configuration (Works with styles loaded via [postcss-loader](https://github.com/postcss/postcss-loader) (CSS, SCSS, etc.) and CSS-in-JS ([styled-components](https://github.com/styled-components/styled-components), [emotion](https://github.com/emotion-js/emotion)))

## Installation

```sh
npm i -D @rescripts/rescript-use-stylelint-config
```

## Usage

#### From a `.stylelintrc`:

```json
[["use-stylelint-config", ".stylelintrc"]]
```

> Searches for the config in your root directory.

#### From config file

Call `use-stylelint-config` with `.stylelintrc.js`, `.stylelintrc.json`, or any other file name (must have `.js` or `.json` extension).

```json
[["use-stylelint-config", "name-your-stylelint-config-whatever.js"]]
```

> Searches for the config from your root directory and `node_modules`.
npm package: @rescripts/rescript-use-tslint-config
Description: ## About
Latest version: 0.0.7

# @rescripts/rescript-use-tslint-config

## About

Use your own TSLint configuration.

## Installation

```sh
npm i -D @rescripts/rescript-use-tslint-config
```

## Usage

#### From config file

Call `use-tslint-config` with `tslint.js`, `tslint.json`, or any other file name (must have `.js` or `.json` extension).

```json
[["use-tslint-config", "tslint.json"]]
```

> Searches for the config from your root directory and `node_modules`.