Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/jderochervlk/rescript-lite-jsx
- Owner: jderochervlk
- Created: 2024-05-15T18:31:37.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-05-16T18:51:24.000Z (7 months ago)
- Last Synced: 2024-11-15T10:57:01.247Z (about 1 month ago)
- Language: ReScript
- Size: 34.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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!