1.1.0 • Published 12 months ago

@jvlk/rescript-lite-jsx v1.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
12 months ago

@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

npm i @jvlk/rescript-lite-jsx

Update your project's rescript.json file.

{
    "bs-dependencies": [
+     "@jvlk/rescript-lite-jsx"
    ],
+   "jsx": {
+       "version": 4,
+       "module": "Lite"
+     }
}

How to use

Just write JSX!

// title.res
@jsx.component
let make = (~message) => <h1 class="title">{message->Lit.string}</h1>

// app.res
let html = <Title message="Welcome!">
  • You should use class and not className
  • Supports HTMX props!
1.1.0

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago