JSPM

@jvlk/rescript-lite-jsx

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q56699F
  • License ISC

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@jvlk/rescript-lite-jsx) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    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

    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!