Skip to content

Commit

Permalink
Version Packages (#4857)
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 17, 2024
1 parent 5aa6eb0 commit a36e3ec
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 38 deletions.
35 changes: 0 additions & 35 deletions .changeset/tall-bobcats-trade.md

This file was deleted.

34 changes: 34 additions & 0 deletions packages/xstate-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
# Changelog

## 4.1.1

### Patch Changes

- [#4844](https://github.com/statelyai/xstate/pull/4844) [`5aa6eb05c`](https://github.com/statelyai/xstate/commit/5aa6eb05c4d79a7efda9895b212fdb45a638f31f) Thanks [@davidkpiano](https://github.com/davidkpiano)! - The `useSelector(…)` hook from `@xstate/react` is now compatible with stores from `@xstate/store`.

```tsx
import { createStore } from '@xstate/store';
import { useSelector } from '@xstate/react';

const store = createStore(
{
count: 0
},
{
inc: {
count: (context) => context.count + 1
}
}
);

function Counter() {
// Note that this `useSelector` is from `@xstate/react`,
// not `@xstate/store/react`
const count = useSelector(store, (state) => state.context.count);

return (
<div>
<button onClick={() => store.send({ type: 'inc' })}>{count}</button>
</div>
);
}
```

## 4.1.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/xstate-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@xstate/react",
"version": "4.1.0",
"version": "4.1.1",
"description": "XState tools for React",
"keywords": [
"state",
Expand Down
34 changes: 34 additions & 0 deletions packages/xstate-svelte/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
# @xstate/svelte

## 3.0.3

### Patch Changes

- [#4844](https://github.com/statelyai/xstate/pull/4844) [`5aa6eb05c`](https://github.com/statelyai/xstate/commit/5aa6eb05c4d79a7efda9895b212fdb45a638f31f) Thanks [@davidkpiano](https://github.com/davidkpiano)! - The `useSelector(…)` hook from `@xstate/react` is now compatible with stores from `@xstate/store`.

```tsx
import { createStore } from '@xstate/store';
import { useSelector } from '@xstate/react';

const store = createStore(
{
count: 0
},
{
inc: {
count: (context) => context.count + 1
}
}
);

function Counter() {
// Note that this `useSelector` is from `@xstate/react`,
// not `@xstate/store/react`
const count = useSelector(store, (state) => state.context.count);

return (
<div>
<button onClick={() => store.send({ type: 'inc' })}>{count}</button>
</div>
);
}
```

## 3.0.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/xstate-svelte/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@xstate/svelte",
"version": "3.0.2",
"version": "3.0.3",
"description": "XState tools for Svelte",
"keywords": [
"state",
Expand Down
34 changes: 34 additions & 0 deletions packages/xstate-vue/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
# @xstate/vue

## 3.1.2

### Patch Changes

- [#4844](https://github.com/statelyai/xstate/pull/4844) [`5aa6eb05c`](https://github.com/statelyai/xstate/commit/5aa6eb05c4d79a7efda9895b212fdb45a638f31f) Thanks [@davidkpiano](https://github.com/davidkpiano)! - The `useSelector(…)` hook from `@xstate/react` is now compatible with stores from `@xstate/store`.

```tsx
import { createStore } from '@xstate/store';
import { useSelector } from '@xstate/react';

const store = createStore(
{
count: 0
},
{
inc: {
count: (context) => context.count + 1
}
}
);

function Counter() {
// Note that this `useSelector` is from `@xstate/react`,
// not `@xstate/store/react`
const count = useSelector(store, (state) => state.context.count);

return (
<div>
<button onClick={() => store.send({ type: 'inc' })}>{count}</button>
</div>
);
}
```

## 3.1.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/xstate-vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@xstate/vue",
"version": "3.1.1",
"version": "3.1.2",
"description": "XState tools for Vue",
"keywords": [
"state",
Expand Down

0 comments on commit a36e3ec

Please sign in to comment.