Repository navigation
mobx-view-model 11 #88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
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 b63cdd7
test: add react 19 regression bug
js2me 8739669
test: add react 19 regression bug
js2me a04b4d9
chore: remove lock files for react regressions
js2me bf75835
fix: typings in useCreateViewModel
js2me b6b7224
fix: bugs in react19 lazy
js2me 3f2352c
refactor: use create view model
js2me c564a3c
refactor: shitty code after LLM
js2me c8f8455
refactor: attach detach vms
js2me f9617fb
chore: remove debug code
js2me f373ab5
fix: a lot of attach detaches for vm bases
js2me a223e40
refactor: fully rewrite view model bases and simple classes
js2me 529f32b
refactor: view model store create vms flow
js2me 27a1c03
refactor: creating view model
js2me 2872631
fix: view model redundant code
js2me 9a61876
fix: typeguards
js2me ff84f6b
feat: add tests for typeguards
js2me e51a183
chore: add wip comments
js2me e608d11
feat: reworking docs
js2me 098f271
chore: update docs
js2me 0979963
chore: update docs
js2me 633cad2
fix: docusite nav header
js2me 4b4e94f
chore: exclude docusite from max release age
js2me 822c462
docs: refactor fully docs(docusite migration)
js2me 1046aa7
chore: update docs
js2me fe7e3e4
fix: missing mount call
js2me a9b0c3c
feat: useCreateViewModel stable work
js2me 2f1c006
feat: working on withViewModel refactor
js2me 1bbb33c
fix: finalize mount checks
js2me ec229d3
refactor: use create view model
js2me 0d515d1
refactor: use create view model
js2me 223c18a
refactor: use create view model
js2me 16d35a1
refactor: withViewModel optimization
js2me 45941dc
refactor: withViewModel optimization
js2me a5b2d32
docs: add docs for v9 + v10 (older versions)
js2me 054c645
fix: unmount new also unmount vm simple
js2me e1d05cd
feat: ssr mode for useCreateViewModel
js2me 4904db1
test: rewrite tests
js2me 8a0ec46
fix: restore ts check after mount/ref typing rewrite
js2me ebf174a
fix: override store create instead of createViewModel in examples
js2me 5475aeb
fix: unblock docs build and refresh nextjs example snapshot
js2me f19c8ef
refactor: separate core and react packages
js2me 66895fb
feat: add solid package
js2me 236acfe
fix: core types
js2me 19e02ff
fix: type regression tests
js2me 46432de
docs: actualize docs for core
js2me dad3035
Merge remote-tracking branch 'origin/master' into next-version
js2me aa6d1f1
docs: fixes docs for react and solid
js2me a914e2d
refactor: renaming in vm store
js2me 8049279
fix: suspense + lazy
js2me 1db9525
fix: trying to optimize pending vm unmount
js2me e111243
fix: trying to optimize pending vm unmount
js2me 252a50e
fix: strict mode type checks
js2me f85836e
fix: suspense + lazy for my lovely react
js2me 59b9fab
docs: add lifecycleState
js2me 87c332e
chore: add debug statement for core + react
js2me 496457b
feat: pending vm unmount wip
js2me 123f67f
fix: try to fix problem with my lovely suspense + lazy for react19
js2me 9e5a6d5
feat: bump mobx solid dep for solid
js2me 576bfe5
test: add react shitty suspense lazy test bug
js2me c4e4579
fix: try to fix problem with my lovely suspense + lazy for react19
js2me 390b66c
docs: save orphans problem for work
js2me 472e7ab
docs: save orphans problem for work
js2me 7c71a4a
feat!: working on new flow useCreateViewModel
js2me aff36c4
feat: add checks for already wrap observer\memo view compennts (withV…
js2me 57b523d
docs: update 4 error
js2me ea29082
docs: add prompt for llm agents for errors
js2me 23ee59a
fix: problem with react shitty suspense + lazy
js2me 2be3240
fix: staged unstaged vms disposing
js2me 751595c
fix: detect Suspense retry loop explicitly
js2me 9eaf677
fix: stabilize Suspense retry lifecycle
js2me 6c41318
refactor: cleanup code
js2me 84ba0b4
chore: remove debug ai statement
js2me ec5d9fb
fix: comments at PR (ai)
js2me 6eea41f
refactor: remove all new methods and props inside view model store base
js2me ee31609
fix: typings
js2me 08d9ead
fix: typings
js2me 2b88258
chore: changeset
js2me ad49c55
feat: add more tests about react suspense
js2me 3696987
fix: comments at PR (ai)
js2me c225474
fix: update React lifecycle and integration docs
js2me 132fa1e
chore: update changeset
js2me 40c0b5d
refactor: symbol VIEW MODEL MARKER removed
js2me 1c70f70
feat: microfrontends friendly
js2me 3e7d3f3
refactor: view model store remove unused fields
js2me 56d0b66
docs: update docs for resource
js2me 4523f63
docs: rewrite guide for resources
js2me 6fcf1e4
feat: add more tests for ssr react + solid
js2me b6c6ff2
feat: working on next version
js2me 946ecc0
fix: address reported docs and framework issues
js2me 9cc380f
fix: comments at PR (ai)
js2me 1bf1e4d
fix: comments at PR (ai)
js2me 86221f9
fix: revert back changes from shitty ai
js2me ff0982e
fix: revert back changes from shitty ai
js2me 2c4f1df
feat: working on app
js2me 27296c7
feat: working on app
js2me d87e99f
refactor: comparer for payload for vm base
js2me d0afc2c
fix: compare payload mentions
js2me 0e272c4
refactor!: remove disableWrapping
js2me 5f894b4
docs: update docs
js2me d847d0e
fix: react use
js2me 2384fa3
Merge remote-tracking branch 'origin/master' into next-version
js2me 54c1af8
docs: update docs
js2me 4e6f14f
refactor: renaming vmData -> data, docs fix
js2me 4f86d60
refactor: remove enableObservableTracking everywhere+resource
js2me 9501cd3
fix: docs docs
js2me 971a117
fix: vm data usage
js2me 994f4df
feat: support multichangelog
js2me 35e9336
fix: solid problems
js2me File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| .vitepress/ | ||
| changelog.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.