-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
glyph-cat
committed
Dec 6, 2024
1 parent
eb1e71e
commit 6910566
Showing
2 changed files
with
8 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# Changelog | ||
|
||
* The `isInitializing` property of `StateManager` and `AsyncStateManager` is now exposed as a `ReadOnlyStateManager`. | ||
* Removed method `.waitForInit` in favor of calling `….isInitializing.wait(false)` directly. | ||
* State Managers without names will be assigned automatic names (`UnnamedStateManager_001`, `UnnamedStateManager_002`, and so on). | ||
* Fixed incorrect export name for UMD builds. | ||
* Events captured by `.watch` now includes `StateChangeEventType` as the second parameter. | ||
* Events captured by `.wait` now includes `StateChangeEventType` as the third parameter. | ||
* Type safety enhancements. | ||
* Internal optimizations. |
This file contains 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 |
---|---|---|
@@ -1,12 +1,5 @@ | ||
# Changelog | ||
|
||
`useInitState` has been removed in favor of a more direct way to find out if a State Manager is initializing: | ||
|
||
```diff | ||
- const isInitializing = useInitState(ExampleState) | ||
+ const isInitializing = useSimpleStateValue(ExampleState.isInitializing) | ||
``` | ||
|
||
The way `useInitState` works internally is also similar to calling `useSimpleStateValue`. By having one less hook means the codebase will have less complexity and becomes easier to maintain. | ||
|
||
On top of that, now that `isInitializing` is exposed as a State Manager itself, this means it is also possible to watch for the changes and even use it with other UI libraries/frameworks such as Vue and Angular with significantly less friction. | ||
* Fixed incorrect export name for UMD builds. | ||
* Fixed a bug where error "Cannot read properties of null (reading 'name')" would be thrown in production. | ||
* Internal optimizations. |