Skip to content

Commit

Permalink
Version Packages (#4833)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] committed Apr 7, 2024
1 parent 8a32374 commit 158eca6
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 39 deletions.
38 changes: 0 additions & 38 deletions .changeset/mighty-walls-know.md

This file was deleted.

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

## 0.0.2

### Patch Changes

- [#4752](https://github.com/statelyai/xstate/pull/4752) [`8a32374e7`](https://github.com/statelyai/xstate/commit/8a32374e79b191dd3bfbab41a15d1b1b4adfd131) Thanks [@davidkpiano](https://github.com/davidkpiano)! - Initial release of `@xstate/store`

```ts
import { createStore } from '@xstate/store';

const store = createStore(
// initial context
{ count: 0, greeting: 'hello' },
// transitions
{
inc: {
count: (context) => context.count + 1
},
updateBoth: {
count: () => 42,
greeting: 'hi'
}
}
);

store.send({
type: 'inc'
});

console.log(store.getSnapshot());
// Logs:
// {
// status: 'active',
// context: {
// count: 1,
// greeting: 'hello'
// }
// }
```
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": "0.0.1",
"version": "0.0.2",
"description": "Simple stores",
"keywords": [
"store",
Expand Down

0 comments on commit 158eca6

Please sign in to comment.