Skip to content

Commit

Permalink
Improve documentation for feature list
Browse files Browse the repository at this point in the history
  • Loading branch information
davesnx committed Sep 25, 2024
1 parent 2e0f6f0 commit fec83a2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@

### Render HTML with JSX

**html_of_jsx** is a JSX transformation to write HTML declaratively in [OCaml](https://ocaml.org), [Reason](https://reasonml.github.io) and [mlx](https://github.com/ocaml-mlx/mlx).
**html_of_jsx** is a JSX transformation and a library to write HTML declaratively in [OCaml](https://ocaml.org), [Reason](https://reasonml.github.io) and [mlx](https://github.com/ocaml-mlx/mlx).

## Features

- Brings the component model to HTML
- Supports most of features from [JSX](https://reasonml.github.io/docs/en/jsx) (uppercase components, fragments, optional attributes, punning)
- but with a few improvements (lowercase components, no need to add annotations)
- Brings the "component model" to HTML
- Supports all of the Reason's [JSX](https://reasonml.github.io/docs/en/jsx) features (uppercase components, fragments, optional attributes, punning)
- but with a few improvements (lowercase components, no need to add the ppx annotation)
- No React idioms (no `className`, no `htmlFor`, no `onChange`, etc...)
- Integrates well with [htmx](https://htmx.org)
- Type-safe, validates attributes and their types ([it can be better thought](https://github.com/davesnx/html_of_jsx/issues/2))
- Works with [OCaml](https://ocaml.org), [Reason](https://reasonml.github.io) and [mlx](https://github.com/ocaml-mlx/mlx)
- Minimal
- `JSX.render` to render a JSX element to a HTML string
- `JSX.*` to construct DOM Elements and DOM nodes (`JSX.string`, `JSX.int`, `JSX.null`, `JSX.list`)
- Created to work on the server-side, but can be used on the client-side as well (with [Melange](https://melange.re) or [jsoo](https://ocsigen.org/js_of_ocaml/))
- `JSX.*` to construct DOM Elements and DOM nodes (`JSX.string`, `JSX.int`, `JSX.null`, `JSX.list` and `JSX.unsafe`)
- Designed to work on the server, but can be used on the client-side as well (with [Melange](https://melange.re) or [jsoo](https://ocsigen.org/js_of_ocaml/))

## Installation

Expand Down
2 changes: 1 addition & 1 deletion docs/features.mld
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ let component: JSX.element =
JSX.render(<component/>)
]}

{2 Works with {{:https://reasonml.github.io}Reason}
{2 Works with {{:https://reasonml.github.io} Reason}

{[
let component = (~name, ()) => {
Expand Down
10 changes: 7 additions & 3 deletions docs/index.mld
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@ The only module exposed is {!JSX} with some functions to construct elements and

{1 Overview}

- Brings the component model to HTML
- Supports most of the JSX features (uppercase components, fragments, optional attributes, punning, childrens, etc...)
- but with a few improvements (lowercase components, no need to add ppx annotations)
- Brings the "component model" to HTML
- Supports all of the Reason's JSX features (uppercase components, fragments, optional attributes, punning)
- but with a few improvements (lowercase components, no need to add the ppx annotation)
- Integrates well with Htmx and others (see the {!page-"htmx"} page)
- No React idioms (no [className], no [htmlFor], no [onChange], etc...), just plain HTML5
- Type-safe, validates attributes and their types
- Works with {{:https://ocaml.org} OCaml}, {{:https://reasonml.github.io} Reason} and {{:https://github.com/ocaml-mlx/mlx}mlx}
- Minimal
- [JSX.render] to render a JSX element to a HTML string
- [JSX.*] to construct DOM Elements and DOM nodes ([JSX.string], [JSX.int], [JSX.null], [JSX.list] and [JSX.unsafe])
- Designed to work on the server, but can be used on the client-side as well (with {{:https://melange.re} Melange} or {{:https://ocsigen.org/js_of_ocaml/} jsoo})

{b See the {!page-"features"} page for all details}

0 comments on commit fec83a2

Please sign in to comment.