diff --git a/.changeset/add-lifecycle-plugin.md b/.changeset/add-lifecycle-plugin.md deleted file mode 100644 index f8eed0674..000000000 --- a/.changeset/add-lifecycle-plugin.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@stackflow/plugin-lifecycle": minor ---- - -Add lifecyclePlugin and useFocusEffect hook for activity focus/blur lifecycle - -- `useFocusEffect(callback)` hook to register per-activity focus/blur callbacks -- Detection and invocation in plugin `onChanged` (outside React render cycle) -- `callbackRef` pattern for always-latest callback without `useCallback` -- Error isolation via `runSafely()` for all user callbacks diff --git a/docs/components/ChangelogContent.mdx b/docs/components/ChangelogContent.mdx index 628db3003..e45a7c407 100644 --- a/docs/components/ChangelogContent.mdx +++ b/docs/components/ChangelogContent.mdx @@ -1,3 +1,17 @@ +## 2026.04.10 + +Add lifecyclePlugin and useFocusEffect hook for activity focus/blur lifecycle [`39dbf81`](https://github.com/daangn/stackflow/commit/39dbf81472af06daa5c40da098e232c2fe3b4a92) + +- `useFocusEffect(callback)` hook to register per-activity focus/blur callbacks +- Detection and invocation in plugin `onChanged` (outside React render cycle) +- `callbackRef` pattern for always-latest callback without `useCallback` +- Error isolation via `runSafely()` for all user callbacks + +Released packages: +- 📦 [@stackflow/plugin-lifecycle@0.1.0](https://npmjs.com/package/@stackflow/plugin-lifecycle/v/0.1.0) + +--- + ## 2026.04.03 Fix intermittent incorrect transition state when `transitionDuration` is set to 0 by ensuring `now >= eventDate` in the initial aggregate call within `dispatchEvent`. [`0160f82`](https://github.com/daangn/stackflow/commit/0160f82738e45932d13715564c4d1da2c4698c18) diff --git a/extensions/plugin-lifecycle/CHANGELOG.md b/extensions/plugin-lifecycle/CHANGELOG.md new file mode 100644 index 000000000..e1161dda0 --- /dev/null +++ b/extensions/plugin-lifecycle/CHANGELOG.md @@ -0,0 +1,12 @@ +# @stackflow/plugin-lifecycle + +## 0.1.0 + +### Minor Changes + +- 39dbf81: Add lifecyclePlugin and useFocusEffect hook for activity focus/blur lifecycle + + - `useFocusEffect(callback)` hook to register per-activity focus/blur callbacks + - Detection and invocation in plugin `onChanged` (outside React render cycle) + - `callbackRef` pattern for always-latest callback without `useCallback` + - Error isolation via `runSafely()` for all user callbacks diff --git a/extensions/plugin-lifecycle/package.json b/extensions/plugin-lifecycle/package.json index 3f23af8ce..220625a4b 100644 --- a/extensions/plugin-lifecycle/package.json +++ b/extensions/plugin-lifecycle/package.json @@ -1,6 +1,6 @@ { "name": "@stackflow/plugin-lifecycle", - "version": "0.0.1", + "version": "0.1.0", "repository": { "type": "git", "url": "https://github.com/daangn/stackflow.git",