Skip to content

Commit 5003e17

Browse files
authored
Merge pull request #25 from js2me/changeset-release/master
Version Packages
2 parents 4820d45 + 53b61bd commit 5003e17

File tree

8 files changed

+64
-73
lines changed

8 files changed

+64
-73
lines changed

.changeset/cuddly-horses-run.md

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

.changeset/dry-cycles-smell.md

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

.changeset/early-breads-fix.md

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

.changeset/forty-icons-wash.md

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

.changeset/pretty-ends-go.md

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

.changeset/tiny-geese-attack.md

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

CHANGELOG.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,68 @@
11
# mobx-view-model
22

3+
## 8.0.0
4+
5+
### Major Changes
6+
7+
- [#24](https://github.com/js2me/mobx-view-model/pull/24) [`16d7a26`](https://github.com/js2me/mobx-view-model/commit/16d7a26a694eb1eed5854aa90f2d49d6dee67f70) Thanks [@js2me](https://github.com/js2me)! - removed all marked as deprecation properties and methods
8+
9+
- Removed `config` property in `ViewModelParams` interface (renamed to `vmConfig`)
10+
- Removed `linkStore` method in `ViewModelSimple` interface (renamed to `attachViewModelStore`)
11+
- Removed type `ComponentWithLazyViewModel` (renamed to `VMLazyComponent`)
12+
- Removed type `ComponentWithViewModel` (renamed to `VMComponent`)
13+
- Removed `params` property in `ViewModelBase` class (renamed to `vmParams`)
14+
15+
- [#24](https://github.com/js2me/mobx-view-model/pull/24) [`16d7a26`](https://github.com/js2me/mobx-view-model/commit/16d7a26a694eb1eed5854aa90f2d49d6dee67f70) Thanks [@js2me](https://github.com/js2me)! - modified global payload processing
16+
17+
Previosly `viewModelsConfig` haved the following configuration:
18+
19+
```ts
20+
comparePayload: 'strict',
21+
payloadObservable: 'ref',
22+
payloadComputed: false,
23+
```
24+
25+
So it was a bit performance overhead. Now it is:
26+
27+
```ts
28+
comparePayload: false,
29+
payloadComputed: 'struct',
30+
payloadObservable: 'ref',
31+
```
32+
33+
### Minor Changes
34+
35+
- [#24](https://github.com/js2me/mobx-view-model/pull/24) [`16d7a26`](https://github.com/js2me/mobx-view-model/commit/16d7a26a694eb1eed5854aa90f2d49d6dee67f70) Thanks [@js2me](https://github.com/js2me)! - added default implementation for `generateId` property in global `viewModelsConfig`
36+
37+
- [#24](https://github.com/js2me/mobx-view-model/pull/24) [`16d7a26`](https://github.com/js2me/mobx-view-model/commit/16d7a26a694eb1eed5854aa90f2d49d6dee67f70) Thanks [@js2me](https://github.com/js2me)! - `id` property now is optional for implementation for `ViewModelSimple` interface
38+
39+
Now you can do not implement `ViewModelSimple` interface to work with this library:
40+
41+
```tsx
42+
class MyVM {
43+
bar = '1'
44+
}
45+
...
46+
const model = useCreateViewModel(MyVM);
47+
return <div>{model.bar}</div>;
48+
```
49+
50+
```tsx
51+
class MyVM {
52+
foo = '1';
53+
}
54+
...
55+
const YouComponent = withViewModel(MyVM, ({ model }) => {
56+
return <div>{model.foo}</div>
57+
});
58+
```
59+
60+
- [#24](https://github.com/js2me/mobx-view-model/pull/24) [`16d7a26`](https://github.com/js2me/mobx-view-model/commit/16d7a26a694eb1eed5854aa90f2d49d6dee67f70) Thanks [@js2me](https://github.com/js2me)! - `parentViewModel` property for `ViewModelSimple` interface
61+
62+
### Patch Changes
63+
64+
- [#24](https://github.com/js2me/mobx-view-model/pull/24) [`16d7a26`](https://github.com/js2me/mobx-view-model/commit/16d7a26a694eb1eed5854aa90f2d49d6dee67f70) Thanks [@js2me](https://github.com/js2me)! - fixed typings for `ParentViewModel` generic type argument for all interfaces/classes (support AnyViewModelSimple)
65+
366
## 7.2.0
467

568
### Minor Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mobx-view-model",
3-
"version": "7.2.0",
3+
"version": "8.0.0",
44
"scripts": {
55
"prepare": "pnpm dev:install-hooks",
66
"clean": "rimraf dist",

0 commit comments

Comments
 (0)