Skip to content

Commit

Permalink
Version release (#3386)
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 May 6, 2022
1 parent bd4b70d commit 2e14aad
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 22 deletions.
6 changes: 0 additions & 6 deletions .changeset/brown-camels-smash.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/swift-ravens-dress.md

This file was deleted.

13 changes: 13 additions & 0 deletions packages/mobx-react-lite/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# mobx-react-lite

## 3.4.0

### Minor Changes

- [`4c5e75cd`](https://github.com/mobxjs/mobx/commit/4c5e75cdfec08c04ad774c70dca0629bd2c77016) [#3382](https://github.com/mobxjs/mobx/pull/3382) Thanks [@iChenLei](https://github.com/iChenLei)! - replace the deprecated react type definition with recommended type definition

* [`bd4b70d8`](https://github.com/mobxjs/mobx/commit/bd4b70d8ded29673af8161aa42fb88dc4ad4420e) [#3387](https://github.com/mobxjs/mobx/pull/3387) Thanks [@mweststrate](https://github.com/mweststrate)! - Added experimental / poor man's support for React 18. Fixes #3363, #2526. Supersedes #3005

- Updated tests, test / build infra, peerDependencies to React 18
- **[breaking icmw upgrading to React 18]** Already deprecated hooks like `useMutableSource` will trigger warnings in React 18, which is correct and those shouldn't be used anymore.
- **[breaking icmw upgrading to React 18]** When using React 18, it is important that `act` is used in **unit tests** around every programmatic mutation. Without it, changes won't propagate!
- The React 18 support is poor man's support; that is, we don't do anything yet to play nicely with Suspense features. Although e.g. [startTransition](https://github.com/mweststrate/platform-app/commit/bdd995773ddc6551235a4d2b0a4c9bd57d30510e) basically works, MobX as is doesn't respect the Suspense model and will always reflect the latest state that is being rendered with, so tearing might occur. I think this is in theoretically addressable by using `useSyncExternalStore` and capturing the current values together with the dependency tree of every component instance. However that isn't included in this pull request 1) it would be a breaking change, whereas the current change is still compatible with React 16 and 17. 2) I want to collect use cases where the tearing leads to problems first to build a better problem understanding. If you run into the problem, please submit an issue describing your scenario, and a PR with a unit tests demonstrating the problem in simplified form. For further discussion see #2526, #3005

## 3.3.0

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/mobx-react-lite/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mobx-react-lite",
"version": "3.3.0",
"version": "3.4.0",
"description": "Lightweight React bindings for MobX based on React 16.8+ and Hooks",
"source": "src/index.ts",
"main": "dist/index.js",
Expand Down Expand Up @@ -39,7 +39,7 @@
"dependencies": {},
"peerDependencies": {
"mobx": "^6.1.0",
"react": "^16.8.0 || ^17 || ^18"
"react": "^16.8.0 || ^17 || ^18"
},
"peerDependenciesMeta": {
"react-dom": {
Expand Down
18 changes: 18 additions & 0 deletions packages/mobx-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# mobx-react

## 7.4.0

### Minor Changes

- [`4c5e75cd`](https://github.com/mobxjs/mobx/commit/4c5e75cdfec08c04ad774c70dca0629bd2c77016) [#3382](https://github.com/mobxjs/mobx/pull/3382) Thanks [@iChenLei](https://github.com/iChenLei)! - replace the deprecated react type definition with recommended type definition

* [`bd4b70d8`](https://github.com/mobxjs/mobx/commit/bd4b70d8ded29673af8161aa42fb88dc4ad4420e) [#3387](https://github.com/mobxjs/mobx/pull/3387) Thanks [@mweststrate](https://github.com/mweststrate)! - Added experimental / poor man's support for React 18. Fixes #3363, #2526. Supersedes #3005

- Updated tests, test / build infra, peerDependencies to React 18
- **[breaking icmw upgrading to React 18]** Already deprecated hooks like `useMutableSource` will trigger warnings in React 18, which is correct and those shouldn't be used anymore.
- **[breaking icmw upgrading to React 18]** When using React 18, it is important that `act` is used in **unit tests** around every programmatic mutation. Without it, changes won't propagate!
- The React 18 support is poor man's support; that is, we don't do anything yet to play nicely with Suspense features. Although e.g. [startTransition](https://github.com/mweststrate/platform-app/commit/bdd995773ddc6551235a4d2b0a4c9bd57d30510e) basically works, MobX as is doesn't respect the Suspense model and will always reflect the latest state that is being rendered with, so tearing might occur. I think this is in theoretically addressable by using `useSyncExternalStore` and capturing the current values together with the dependency tree of every component instance. However that isn't included in this pull request 1) it would be a breaking change, whereas the current change is still compatible with React 16 and 17. 2) I want to collect use cases where the tearing leads to problems first to build a better problem understanding. If you run into the problem, please submit an issue describing your scenario, and a PR with a unit tests demonstrating the problem in simplified form. For further discussion see #2526, #3005

### Patch Changes

- Updated dependencies [[`4c5e75cd`](https://github.com/mobxjs/mobx/commit/4c5e75cdfec08c04ad774c70dca0629bd2c77016), [`bd4b70d8`](https://github.com/mobxjs/mobx/commit/bd4b70d8ded29673af8161aa42fb88dc4ad4420e)]:
- mobx-react-lite@3.4.0

## 7.3.0

### Minor Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/mobx-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mobx-react",
"version": "7.3.0",
"version": "7.4.0",
"description": "React bindings for MobX. Create fully reactive components.",
"source": "src/index.ts",
"main": "dist/index.js",
Expand Down Expand Up @@ -36,7 +36,7 @@
},
"homepage": "https://mobx.js.org",
"dependencies": {
"mobx-react-lite": "^3.3.0"
"mobx-react-lite": "^3.4.0"
},
"peerDependencies": {
"mobx": "^6.1.0",
Expand All @@ -52,7 +52,7 @@
},
"devDependencies": {
"mobx": "^6.4.0",
"mobx-react-lite": "^3.3.0"
"mobx-react-lite": "^3.4.0"
},
"keywords": [
"mobx",
Expand Down

0 comments on commit 2e14aad

Please sign in to comment.