Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jderochervlk/rescript-lite-jsx

Rescript bindings for lite-jsx
https://github.com/jderochervlk/rescript-lite-jsx

Last synced: 9 days ago
JSON representation

Rescript bindings for lite-jsx

Awesome Lists containing this project

README

        

# @jvlk/rescript-lite-jsx
ReScript support for lite-jsx, a lightweight library to generate HTML. A good match for something like HTMX.

https://github.com/lite-jsx/core

Requires Rescript 11+.

## Installation
```bash
npm i @jvlk/rescript-lite-jsx
```
Update your project's `rescript.json` file.
```diff
{
"bs-dependencies": [
+ "@jvlk/rescript-lite-jsx"
],
+ "jsx": {
+ "version": 4,
+ "module": "Lite"
+ }
}
```
## How to use
Just write JSX!
```rescript
// title.res
@jsx.component
let make = (~message) =>

{message->Lit.string}

// app.res
let html =
```

- You should use `class` and not `className`
- Supports HTMX props!