Skip to content
Merged
Show file tree
Hide file tree
Changes from 92 commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
0fd471f
fix: try to fix bug with suspense duplicate vms
js2me Jul 7, 2026
b63cdd7
test: add react 19 regression bug
js2me Jul 7, 2026
8739669
test: add react 19 regression bug
js2me Jul 7, 2026
a04b4d9
chore: remove lock files for react regressions
js2me Jul 7, 2026
bf75835
fix: typings in useCreateViewModel
js2me Jul 7, 2026
b6b7224
fix: bugs in react19 lazy
js2me Jul 8, 2026
3f2352c
refactor: use create view model
js2me Jul 8, 2026
c564a3c
refactor: shitty code after LLM
js2me Jul 9, 2026
c8f8455
refactor: attach detach vms
js2me Jul 9, 2026
f9617fb
chore: remove debug code
js2me Jul 9, 2026
f373ab5
fix: a lot of attach detaches for vm bases
js2me Jul 9, 2026
a223e40
refactor: fully rewrite view model bases and simple classes
js2me Jul 11, 2026
529f32b
refactor: view model store create vms flow
js2me Jul 13, 2026
27a1c03
refactor: creating view model
js2me Jul 13, 2026
2872631
fix: view model redundant code
js2me Jul 13, 2026
9a61876
fix: typeguards
js2me Jul 13, 2026
ff84f6b
feat: add tests for typeguards
js2me Jul 13, 2026
e51a183
chore: add wip comments
js2me Jul 13, 2026
e608d11
feat: reworking docs
js2me Jul 14, 2026
098f271
chore: update docs
js2me Jul 14, 2026
0979963
chore: update docs
js2me Jul 14, 2026
633cad2
fix: docusite nav header
js2me Jul 14, 2026
4b4e94f
chore: exclude docusite from max release age
js2me Jul 14, 2026
822c462
docs: refactor fully docs(docusite migration)
js2me Jul 14, 2026
1046aa7
chore: update docs
js2me Jul 14, 2026
fe7e3e4
fix: missing mount call
js2me Jul 14, 2026
a9b0c3c
feat: useCreateViewModel stable work
js2me Jul 14, 2026
2f1c006
feat: working on withViewModel refactor
js2me Jul 15, 2026
1bbb33c
fix: finalize mount checks
js2me Jul 16, 2026
ec229d3
refactor: use create view model
js2me Jul 18, 2026
0d515d1
refactor: use create view model
js2me Jul 18, 2026
223c18a
refactor: use create view model
js2me Jul 19, 2026
16d35a1
refactor: withViewModel optimization
js2me Jul 19, 2026
45941dc
refactor: withViewModel optimization
js2me Jul 20, 2026
a5b2d32
docs: add docs for v9 + v10 (older versions)
js2me Jul 21, 2026
054c645
fix: unmount new also unmount vm simple
js2me Jul 21, 2026
e1d05cd
feat: ssr mode for useCreateViewModel
js2me Jul 22, 2026
4904db1
test: rewrite tests
js2me Jul 23, 2026
8a0ec46
fix: restore ts check after mount/ref typing rewrite
js2me Jul 23, 2026
ebf174a
fix: override store create instead of createViewModel in examples
js2me Jul 23, 2026
5475aeb
fix: unblock docs build and refresh nextjs example snapshot
js2me Jul 23, 2026
f19c8ef
refactor: separate core and react packages
js2me Jul 23, 2026
66895fb
feat: add solid package
js2me Jul 23, 2026
236acfe
fix: core types
js2me Jul 23, 2026
19e02ff
fix: type regression tests
js2me Jul 24, 2026
46432de
docs: actualize docs for core
js2me Jul 24, 2026
dad3035
Merge remote-tracking branch 'origin/master' into next-version
js2me Jul 24, 2026
aa6d1f1
docs: fixes docs for react and solid
js2me Jul 24, 2026
a914e2d
refactor: renaming in vm store
js2me Jul 24, 2026
8049279
fix: suspense + lazy
js2me Jul 25, 2026
1db9525
fix: trying to optimize pending vm unmount
js2me Jul 25, 2026
e111243
fix: trying to optimize pending vm unmount
js2me Jul 25, 2026
252a50e
fix: strict mode type checks
js2me Jul 25, 2026
f85836e
fix: suspense + lazy for my lovely react
js2me Jul 25, 2026
59b9fab
docs: add lifecycleState
js2me Jul 25, 2026
87c332e
chore: add debug statement for core + react
js2me Jul 27, 2026
496457b
feat: pending vm unmount wip
js2me Jul 28, 2026
123f67f
fix: try to fix problem with my lovely suspense + lazy for react19
js2me Jul 28, 2026
9e5a6d5
feat: bump mobx solid dep for solid
js2me Jul 28, 2026
576bfe5
test: add react shitty suspense lazy test bug
js2me Jul 31, 2026
c4e4579
fix: try to fix problem with my lovely suspense + lazy for react19
js2me Aug 2, 2026
390b66c
docs: save orphans problem for work
js2me Aug 2, 2026
472e7ab
docs: save orphans problem for work
js2me Aug 2, 2026
7c71a4a
feat!: working on new flow useCreateViewModel
js2me Aug 5, 2026
aff36c4
feat: add checks for already wrap observer\memo view compennts (withV…
js2me Aug 6, 2026
57b523d
docs: update 4 error
js2me Aug 6, 2026
ea29082
docs: add prompt for llm agents for errors
js2me Aug 6, 2026
23ee59a
fix: problem with react shitty suspense + lazy
js2me Aug 8, 2026
2be3240
fix: staged unstaged vms disposing
js2me Aug 8, 2026
751595c
fix: detect Suspense retry loop explicitly
js2me Aug 21, 2026
9eaf677
fix: stabilize Suspense retry lifecycle
js2me Aug 21, 2026
6c41318
refactor: cleanup code
js2me Aug 23, 2026
84ba0b4
chore: remove debug ai statement
js2me Aug 23, 2026
ec5d9fb
fix: comments at PR (ai)
js2me Aug 23, 2026
6eea41f
refactor: remove all new methods and props inside view model store base
js2me Sep 6, 2026
ee31609
fix: typings
js2me Sep 6, 2026
08d9ead
fix: typings
js2me Sep 6, 2026
2b88258
chore: changeset
js2me Sep 7, 2026
ad49c55
feat: add more tests about react suspense
js2me Sep 20, 2026
3696987
fix: comments at PR (ai)
js2me Sep 20, 2026
c225474
fix: update React lifecycle and integration docs
js2me Sep 20, 2026
132fa1e
chore: update changeset
js2me Sep 21, 2026
40c0b5d
refactor: symbol VIEW MODEL MARKER removed
js2me Sep 21, 2026
1c70f70
feat: microfrontends friendly
js2me Sep 21, 2026
3e7d3f3
refactor: view model store remove unused fields
js2me Sep 21, 2026
56d0b66
docs: update docs for resource
js2me Sep 21, 2026
4523f63
docs: rewrite guide for resources
js2me Sep 21, 2026
6fcf1e4
feat: add more tests for ssr react + solid
js2me Sep 26, 2026
b6c6ff2
feat: working on next version
js2me Sep 27, 2026
946ecc0
fix: address reported docs and framework issues
js2me Sep 29, 2026
9cc380f
fix: comments at PR (ai)
js2me Oct 3, 2026
1bf1e4d
fix: comments at PR (ai)
js2me Oct 3, 2026
86221f9
fix: revert back changes from shitty ai
js2me Oct 3, 2026
ff0982e
fix: revert back changes from shitty ai
js2me Oct 3, 2026
2c4f1df
feat: working on app
js2me Oct 3, 2026
27296c7
feat: working on app
js2me Oct 3, 2026
d87e99f
refactor: comparer for payload for vm base
js2me Oct 3, 2026
d0afc2c
fix: compare payload mentions
js2me Oct 3, 2026
0e272c4
refactor!: remove disableWrapping
js2me Oct 3, 2026
5f894b4
docs: update docs
js2me Oct 3, 2026
d847d0e
fix: react use
js2me Oct 3, 2026
2384fa3
Merge remote-tracking branch 'origin/master' into next-version
js2me Oct 3, 2026
54c1af8
docs: update docs
js2me Oct 3, 2026
4e6f14f
refactor: renaming vmData -> data, docs fix
js2me Oct 3, 2026
4f86d60
refactor: remove enableObservableTracking everywhere+resource
js2me Oct 3, 2026
9501cd3
fix: docs docs
js2me Oct 3, 2026
971a117
fix: vm data usage
js2me Oct 3, 2026
994f4df
feat: support multichangelog
js2me Oct 3, 2026
35e9336
fix: solid problems
js2me Oct 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions .changeset/funky-coins-read.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"mobx-view-model-react": patch
"mobx-view-model-solid": patch
"mobx-view-model": patch
---

Namespace React and Solid view-model contexts to prevent cross-framework collisions.
79 changes: 79 additions & 0 deletions .changeset/public-cities-knock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
"mobx-view-model-react": major
"mobx-view-model": major
---

**Breaking:** `mobx-view-model` is now framework-agnostic. React bindings must
be imported from `mobx-view-model-react`; the `mobx-view-model/react` export
has been removed.

**Breaking:** replace the ViewModelStore attachment lifecycle APIs with
`define()`, `create()`, `connect()`, `unmount()`, and `generateId()`. Automatic
and global core view-model ID generation have been removed; store callers must
provide an ID, while framework integrations own any render-time ID generation
or custom `generateId()` behavior.

**Breaking:** ViewModel lifecycle and configuration APIs have been simplified:
use `lifecycleState` and `setPayload()` instead of `isUnmounting` and
`payloadChanged`; replace `ViewModelSimple.attachViewModelStore` with `init()`;
and replace `processViewComponent` with framework-agnostic `processRender`.

Improve view-model creation and lifecycle handling for React 18 and React 19
Strict Mode, Suspense, lazy-loaded components, and SSR.

### Removed

- `ViewModelStore.markToBeAttached()`
- `ViewModelStore.attach()` and `ViewModelStore.detach()`
- `ViewModelStore.isAbleToRenderView()`
- `ViewModelStore.createViewModel()`
- `ViewModelStore.processCreateConfig()`
- `ViewModelStore.generateViewModelId()`
- `ViewModelStoreBase.getOrCreateVmId()` and its attachment/mounting state
- `ViewModel.isUnmounting` and `ViewModel.payloadChanged` from the `ViewModel`
interface; `ViewModel.vmConfig` is no longer part of that interface, although
`ViewModelBase` still exposes its merged `vmConfig` configuration
- `ViewModelParams.parentViewModelId`
- `ViewModelSimple.attachViewModelStore()`
- `ViewModelStore.mountedViewsCount`
- `GenerateViewModelIdFn` and `generateVmId`
- the `mobx-view-model/react` export and React dependencies from the core package
- configuration options `generateId`, `flushPendingReactions`, `useReactIds`,
`suspendUntil`, `wrapViewsInObserver`, and `processViewComponent`
- the misspelled `isViewModeSimpleClass` export

### Changed

- `ViewModelStore.generateId()` now receives a required `id` and returns it by
default; custom stores can override it for application-specific IDs.
- `ViewModelBase.setPayload()` now returns whether the payload was unchanged.
- `ViewModelBase.willMount()` may be asynchronous, and concurrent `mount()`
calls are deduplicated.
- `ViewModelBase.unmount()` is synchronous; lifecycle is represented by
`lifecycleState` instead of `isUnmounting`.
- Parent view models must be passed through `parentViewModel`; the store no
longer resolves them from `parentViewModelId`.
- `ViewModelsConfig.processViewComponent` was renamed to `processRender` and
now works with framework-agnostic render functions.
- `ViewModelsConfig` now requires `mode` and `getPayload`; `reactHook` also
uses a framework-agnostic signature.
- Runtime detection of full and simple view models is now explicit and no
longer depends on the presence of `payloadChanged`.

### Added

- `ViewModelStore.define()` to create, connect, register, and reuse a
view-model instance by ID.
- `ViewModelStore.create()` for creating an instance without registering it.
- `ViewModelStore.connect()` for registering an existing instance after
creation or render commit.
- `ViewModelStore.unmount()` for synchronous unmount and removal from the
store.
- `ViewModelStore.resource` and `ViewModelResource` for request-scoped SSR
resources.
- `ViewModelSimple.init()` as the initialization hook for simple view models.
- `ViewModelsConfig.processRender()` as the framework-agnostic render hook.
- More reliable `isViewModel()`, `isViewModelClass()`, `isViewModelSimple()`,
and `isViewModelSimpleClass()` classification for custom view-model classes.
- React staging and cleanup for abandoned renders, Suspense retries, lazy
components, Strict Mode, and SSR.
5 changes: 5 additions & 0 deletions .changeset/solid-integration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"mobx-view-model-solid": minor
---

Add SolidJS integration package (`mobx-view-model-solid`) powered by mobx-solid.
5 changes: 5 additions & 0 deletions .changeset/tiny-devtools-react-binding.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"mobx-view-model-devtools": patch
---

Update DevTools to use the separated `mobx-view-model-react` bindings.
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ packages/*/node_modules
dist
coverage
unit-tests-coverage
playwright-report/
test-results/
docs/.vitepress/cache
packalink.config.mjs
.pnpm-store/
Expand All @@ -16,6 +18,12 @@ examples/*/public/app.css
tests/type-regressions/consumer-react19/pnpm-lock.yaml
tests/type-regressions/consumer-react18/pnpm-lock.yaml

# Regenerated by scripts/test-react-type-regression.mjs (ephemeral fixture install)
tests/react-regressions/react18/pnpm-lock.yaml
tests/react-regressions/react19/pnpm-lock.yaml


.pnpm-store
index.db
index.db

TEST_PROJECTS.md
2 changes: 2 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.vitepress/
changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export async function loadDevtools() {
{ id: 'introduction', label: 'Introduction', path: '/introduction/overview' },
{ id: 'api', label: 'Core API', path: '/api/view-models/overview' },
{ id: 'react', label: 'React', path: '/react/integration' },
{ id: 'solid', label: 'Solid', path: '/solid/integration' },
{ id: 'recipes', label: 'Recipes', path: '/recipes/all-props-as-payload' },
{ id: 'other', label: 'Other', path: '/other/dev-tools' },
],
Expand Down Expand Up @@ -409,6 +410,8 @@ export async function loadDevtools() {
}
}

try {

const navVM = new DocsDemoNavVM();
store.attach(navVM);
store.attach(new DocsDemoNavBreadcrumbVM(navVM));
Expand Down Expand Up @@ -444,4 +447,5 @@ export async function loadDevtools() {
simple: ['home', 'counter'],
},
});
} catch(_) {}
Comment thread
js2me marked this conversation as resolved.
}
246 changes: 0 additions & 246 deletions docs/.vitepress/config.mts

This file was deleted.

Loading
Loading