DrSensor / DrSensor/nusa

Data lifetime across pages

Open
#14 1 comment 0 reactions 0 assignees View on GitHub
data binding decorator enhancement navigation priority: high
Dominant language
JavaScript
Stars
4
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Control the lifetime of the class. Whatever it should persist across page or reset on every page navigation.

### mass control
```html

```

### granular control
```ts
import { vary, keep, persist } from "https://esm.run/wiles/decorator" // ignore data-persist attribute
export default class {
@vary accessor start = 0 // swap databank with new array
@keep accessor end = 10 // keep databank on every navigation or append if page/component/scope not yet cached
@persist accessor total: number // stored in IndexDB on each eventful write
accessor count = 1 // behavior depend on data-persist attribute
}
```
or without decorator (not sure if I gonna support this 🤔)
```html

```

Requirement:
- Snapshot
- #40
- #15

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.