Skip to content

Commit b73a0e4

Browse files
Version Packages (#5432)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 77ec4ad commit b73a0e4

File tree

3 files changed

+26
-25
lines changed

3 files changed

+26
-25
lines changed

.changeset/odd-wombats-thank.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

packages/xstate-store/CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
# @xstate/store
22

3+
## 3.14.0
4+
5+
### Minor Changes
6+
7+
- [#5427](https://github.com/statelyai/xstate/pull/5427) [`77ec4ad`](https://github.com/statelyai/xstate/commit/77ec4ad34e3f7e7109a41edd13353bec640cd1a7) Thanks [@davidkpiano](https://github.com/davidkpiano)! - Add `.with()` method for store extensions.
8+
9+
```ts
10+
import { createStore } from '@xstate/store';
11+
import { undoRedo } from '@xstate/store/undo';
12+
13+
const store = createStore({
14+
context: { count: 0 },
15+
on: {
16+
inc: (ctx) => ({ count: ctx.count + 1 }),
17+
dec: (ctx) => ({ count: ctx.count - 1 })
18+
}
19+
}).with(undoRedo());
20+
21+
store.trigger.inc(); // count = 1
22+
23+
// Added from the undoRedo extension
24+
store.trigger.undo(); // count = 0
25+
store.trigger.redo(); // count = 1
26+
```
27+
328
## 3.13.0
429

530
### Minor Changes

packages/xstate-store/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@xstate/store",
3-
"version": "3.13.0",
3+
"version": "3.14.0",
44
"description": "Simple stores",
55
"keywords": [
66
"store",

0 commit comments

Comments
 (0)