Skip to content

Commit

Permalink
Updated changelogs
Browse files Browse the repository at this point in the history
  • Loading branch information
glyph-cat committed Dec 6, 2024
1 parent eb1e71e commit 6910566
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
8 changes: 5 additions & 3 deletions packages/core/CHANGELOG.md
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.
13 changes: 3 additions & 10 deletions packages/react/CHANGELOG.md
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.

0 comments on commit 6910566

Please sign in to comment.