DrSensor / DrSensor/nusa

Data fetching++

Open
#72 5 comments 0 reactions 0 assignees View on GitHub
data binding enhancement experimental
Dominant language
JavaScript
Stars
4
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Inspired from htmx but use any arbitrary data format for data binding instead of swapping html.

> **Note**
> When linking JSON data, the format is determined by http header `N-Data-Format` with the value is either `column` or `row`.
```html

.
.


Name
Location
Birth Day








```

> **Note**
> For single data (not table), the value of `N-Data-Format` is either `record` or `entry`.
```html

name:

Reload

Update

Force Update

```
> **Note**
> Those paired http methods are the default, everything else is custom

> **Note**
> Sometimes `N-Data-Format` can be inferred based on the data shape itself.

Use `` to handle multiple data.
```html



  • Name
  • Project

Reload [GET] multiple data

Update [POST] multiple data

Force Update [POST] multiple data

```
In that example, each `` is a record. However, it also applicable on table too (i.e via html attribute `type=text/csv` or response header `N-Data-Format: column`) which need `` to render each `

  • `.
  • Contributor guide

    No contributing guide indexed for this repository

    Assessment

    This issue has not been assessed yet.

    Get new issues in your inbox

    A short digest of beginner-friendly GitHub issues.