Update package READMEs

This commit is contained in:
Daniel J. Summers 2022-07-14 09:24:49 -04:00
parent a169000ce2
commit 4be5bad8ef
2 changed files with 6 additions and 4 deletions

View File

@ -2,7 +2,7 @@
This package enables server-side support for [htmx](https://htmx.org) within [Giraffe](https://giraffe.wiki) and ASP.NET's `HttpContext`.
**htmx version: 1.7.0**
**htmx version: 1.8.0**
### Setup
@ -27,9 +27,11 @@ To set a response header:
let myHandler : HttpHander =
fun next ctx ->
// some meaningful work
withHxPush "/some/new/url" >=> [other handlers]
withHxPushUrl "/some/new/url" >=> [other handlers]
```
The `HxSwap` module has constants to use for the `HX-Reswap` header. These may be extended with settle, show, and other qualifiers; see the htmx documentation for the `hx-swap` attribute for more information.
### Learn
The naming conventions of this library were selected to mirror those provided by htmx. The header properties become `Hx*` on the `ctx.Request.Headers` object, and the response handlers are `withHx*` based on the header being set. The only part that does not line up is `withHxTrigger*` and `withHxTriggerMany`; the former set work with a single string (to trigger a single event with no arguments), while the latter set supports both arguments and multiple events.

View File

@ -2,7 +2,7 @@
This package enables [htmx](https://htmx.org) support within the [Giraffe](https://giraffe.wiki) view engine.
**htmx version: 1.7.0**
**htmx version: 1.8.0**
### Setup
@ -23,7 +23,7 @@ Support modules include:
- `HxHeaders`
- `HxParams`
- `HxRequest`
- `HxSwap`
- `HxSwap` (requires `open Giraffe.Htmx`)
- `HxTrigger`
- `HxVals`