Skip to content

Commit

Permalink
Version Packages (#4740)
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] authored Feb 12, 2024
1 parent c2402e7 commit b5d40d8
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 17 deletions.
15 changes: 0 additions & 15 deletions .changeset/beige-donuts-grab.md

This file was deleted.

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

## 4.1.0

### Minor Changes

- [#4231](https://github.com/statelyai/xstate/pull/4231) [`c2402e7bc`](https://github.com/statelyai/xstate/commit/c2402e7bc269dd1f1a9eca0d3e4484ad5a4cfadb) Thanks [@davidkpiano](https://github.com/davidkpiano)! - The `actor` passed to `useSelector(actor, selector)` is now allowed to be `undefined` for an actor that may not exist yet. For actors that may be `undefined`, the `snapshot` provided to the `selector` function can also be `undefined`:

```ts
const count = useSelector(maybeActor, (snapshot) => {
// `snapshot` may be undefined
return snapshot?.context.count;
});

count; // number | undefined
```

## 4.0.3

### Patch 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.0.3",
"version": "4.1.0",
"description": "XState tools for React",
"keywords": [
"state",
Expand Down
15 changes: 15 additions & 0 deletions packages/xstate-vue/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# @xstate/vue

## 3.1.0

### Minor Changes

- [#4231](https://github.com/statelyai/xstate/pull/4231) [`c2402e7bc`](https://github.com/statelyai/xstate/commit/c2402e7bc269dd1f1a9eca0d3e4484ad5a4cfadb) Thanks [@davidkpiano](https://github.com/davidkpiano)! - The `actor` passed to `useSelector(actor, selector)` is now allowed to be `undefined` for an actor that may not exist yet. For actors that may be `undefined`, the `snapshot` provided to the `selector` function can also be `undefined`:

```ts
const count = useSelector(maybeActor, (snapshot) => {
// `snapshot` may be undefined
return snapshot?.context.count;
});

count; // number | undefined
```

## 3.0.3

### 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.0.3",
"version": "3.1.0",
"description": "XState tools for Vue",
"keywords": [
"state",
Expand Down

0 comments on commit b5d40d8

Please sign in to comment.