Skip to content
Open
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
13 changes: 0 additions & 13 deletions .changeset/add-plugin-blocker.md

This file was deleted.

17 changes: 17 additions & 0 deletions docs/components/ChangelogContent.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
## 2026.03.17

Add blockerPlugin and useBlocker hook for navigation blocking [`c740c5e`](https://github.com/daangn/stackflow/commit/c740c5e28c30afc23fff8705c405cefa514a1f35)

- `useBlocker({ shouldBlock, onBlocked })` hook to declare blocking policies per activity
- Blocking set model: multiple blockers can block a navigation, all must `proceed()` for it to execute
- Only blockers from active (`isActive: true`) activities are evaluated
- `onBlocked` notifications are serialized in navigation occurrence order (no re-entrancy)
- Error isolation: one blocker's `onBlocked` throwing does not prevent other blockers from being notified
- Plugin-level `onError` option for custom error handling (defaults to `console.error`)
- Blocker cleanup on component unmount; previously captured `proceed` remains callable

Released packages:
- 📦 [@stackflow/plugin-blocker@0.1.0](https://npmjs.com/package/@stackflow/plugin-blocker/v/0.1.0)

---

## 2026.03.13

fix(core): prevent duplicate setInterval in dispatchEvent [`4d3b294`](https://github.com/daangn/stackflow/commit/4d3b29414aaa42ee405104f9cf7fb9c687fdf54c)
Expand Down
15 changes: 15 additions & 0 deletions extensions/plugin-blocker/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# @stackflow/plugin-blocker

## 0.1.0

### Minor Changes

- c740c5e: Add blockerPlugin and useBlocker hook for navigation blocking

- `useBlocker({ shouldBlock, onBlocked })` hook to declare blocking policies per activity
- Blocking set model: multiple blockers can block a navigation, all must `proceed()` for it to execute
- Only blockers from active (`isActive: true`) activities are evaluated
- `onBlocked` notifications are serialized in navigation occurrence order (no re-entrancy)
- Error isolation: one blocker's `onBlocked` throwing does not prevent other blockers from being notified
- Plugin-level `onError` option for custom error handling (defaults to `console.error`)
- Blocker cleanup on component unmount; previously captured `proceed` remains callable
2 changes: 1 addition & 1 deletion extensions/plugin-blocker/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stackflow/plugin-blocker",
"version": "0.0.1",
"version": "0.1.0",
"repository": {
"type": "git",
"url": "https://github.com/daangn/stackflow.git",
Expand Down
Loading