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
19 changes: 0 additions & 19 deletions .changeset/legal-lines-relate.md

This file was deleted.

10 changes: 0 additions & 10 deletions .changeset/modern-rivers-leave.md

This file was deleted.

22 changes: 0 additions & 22 deletions .changeset/tangy-spies-study.md

This file was deleted.

46 changes: 46 additions & 0 deletions packages/xstate-store/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,51 @@
# @xstate/store

## 3.11.0

### Minor Changes

- [#5393](https://github.com/statelyai/xstate/pull/5393) [`6d00d3f`](https://github.com/statelyai/xstate/commit/6d00d3fd3cdb27b3bb19557cc9ee84f85bd38fe8) Thanks [@davidkpiano](https://github.com/davidkpiano)! - Add `snapshot` parameter to `getTransactionId` function.

```ts
const store = createStore(
undo(
{
// ...
},
{
getTransactionId: (event, snapshot) =>
snapshot.context.currentTransactionId
}
)
);
```

- [#5392](https://github.com/statelyai/xstate/pull/5392) [`5854b52`](https://github.com/statelyai/xstate/commit/5854b52c3fa1915f7f4620f144482d164af535e8) Thanks [@davidkpiano](https://github.com/davidkpiano)! - Added an overload to `useSelector` that allows you to select the entire snapshot:

```ts
// No selector provided, return the entire snapshot
const snapshot = useSelector(store);
```

- [#5393](https://github.com/statelyai/xstate/pull/5393) [`6d00d3f`](https://github.com/statelyai/xstate/commit/6d00d3fd3cdb27b3bb19557cc9ee84f85bd38fe8) Thanks [@davidkpiano](https://github.com/davidkpiano)! - Add `skipEvent` option to `undoRedo()` to exclude certain events from undo/redo history.

```ts
const store = createStore(
undoRedo(
{
context: { count: 0 },
on: {
inc: (ctx) => ({ count: ctx.count + 1 }),
log: (ctx) => ctx // No state change
}
},
{
skipEvent: (event, snapshot) => event.type === 'log'
}
)
);
```

## 3.10.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/xstate-store/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@xstate/store",
"version": "3.10.0",
"version": "3.11.0",
"description": "Simple stores",
"keywords": [
"store",
Expand Down