Skip to content

feat: add withHistory, devtools, and subscribeKey utilities for enhanced state management#7

Merged
codeBelt merged 8 commits intomainfrom
utils-plugins
Feb 17, 2026
Merged

feat: add withHistory, devtools, and subscribeKey utilities for enhanced state management#7
codeBelt merged 8 commits intomainfrom
utils-plugins

Conversation

@codeBelt
Copy link
Copy Markdown
Owner

  • withHistory: Adds undo/redo functionality to stores with a snapshot stack.
  • devtools: Integrates stores with Redux DevTools for debugging and time travel.
  • subscribeKey: Enables subscribing to changes on specific properties in stores.

… enhanced state management

- `withHistory`: Adds undo/redo functionality to stores with a snapshot stack.
- `devtools`: Integrates stores with Redux DevTools for debugging and time travel.
- `subscribeKey`: Enables subscribing to changes on specific properties in stores.
@codeBelt codeBelt self-assigned this Feb 17, 2026
Base automatically changed from useLocalStore to main February 17, 2026 13:32
…tilities

- Added `useLocalStore` details to architecture and docs.
- Expanded file structures to include `devtools`, `subscribeKey`, and `withHistory` utilities.
- Refined examples and tutorials for consistency and clarity.
…safety checks

- Wrapped state application logic in `try-finally` blocks to ensure cleanup (`isTimeTraveling`, `paused`, `hydrating`) regardless of errors.
- Improved safety by skipping operations during invalid states (e.g., `hydration`/`disposed` in `persist`).
- Added `shallowEqual` utility export to utils index.
- Added additional tests for `devtools` to cover time travel, error handling, and message payloads.
- Extended test cases for `persist` to handle null states, invalid envelopes, and unsubscribe behavior.
- Introduced more cases for `subscribeKey` with various data types and subscriber behavior.
- Enhanced `shallowEqual` tests to include edge cases such as array vs object comparison and handling undefined values.
… and computed behavior

- Added extensive tests for `useStore` covering error handling, multiple stores, selector edge cases, and derived selectors.
- Enhanced `computed getter` memoization tests, including nested dependencies and structural sharing across versions.
- Expanded test cases for `snapshot` behavior, including object freezing, deleted properties, and specialized structures.
- Introduced test cases for `ReactiveMap` and `ReactiveSet` with numeric keys, `NaN`, object keys, and snapshot consistency.
- Improved coverage for version tracking, child proxy management, and error scenarios in `core`.
@codeBelt codeBelt merged commit 64489ea into main Feb 17, 2026
1 check passed
@codeBelt codeBelt deleted the utils-plugins branch February 17, 2026 16:32
@github-actions github-actions bot mentioned this pull request Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant