Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/agera/.size-limit.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@
"name": "All publics",
"path": "dist/index.js",
"import": "*",
"limit": "2.47 kB"
"limit": "2.63 kB"
},
{
"name": "Signal",
"path": "dist/index.js",
"import": "{ signal }",
"limit": "1.59 kB"
"limit": "1.61 kB"
},
{
"name": "Minimal set",
"path": "dist/index.js",
"import": "{ signal, computed, effect }",
"limit": "1.75 kB"
"limit": "1.8 kB"
},
{
"name": "Popular set",
"path": "dist/index.js",
"import": "{ signal, computed, effect, mountable, onMounted }",
"limit": "1.88 kB"
"limit": "1.92 kB"
}
]
27 changes: 0 additions & 27 deletions packages/agera/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,33 +147,6 @@ const stop = effectScope(() => {
stop() // stop all effects
```

### `deferScope`

Also there is a possibility to create a defer scope.

```ts
import { signal, deferScope, effectScope, effect } from 'agera'

const $a = signal(0)
const $b = signal(0)
// All scopes will run immediately, but effects run is delayed
const start = deferScope(() => {
effect(() => {
console.log('A:', $a())
})

effectScope(() => {
effect(() => {
console.log('B:', $b())
})
})
}, true) // marks scope as lazy
// start all effects
const stop = start()

stop() // stop all effects
```

### `subscribe`

`subscribe` subscribes to accessor changes. Callback will be called immediately with the current value and on every subsequent change. Will trigger accessor mount if applicable.
Expand Down
Loading