|
1 | 1 | <a name="20.0.0-beta.0"></a>
|
2 | 2 |
|
| 3 | +# [20.0.0-beta.0](https://github.com/ngrx/platform/compare/19.2.1...20.0.0-beta.0) (2025-06-30) |
| 4 | + |
| 5 | +### Bug Fixes |
| 6 | + |
| 7 | +- **signals:** handle events in the dispatched order ([#4857](https://github.com/ngrx/platform/issues/4857)) ([fa50f43](https://github.com/ngrx/platform/commit/fa50f43)), closes [#4852](https://github.com/ngrx/platform/issues/4852) |
| 8 | +- **www:** Add padding to code snippets ([#4812](https://github.com/ngrx/platform/issues/4812)) ([9e942db](https://github.com/ngrx/platform/commit/9e942db)), closes [#4811](https://github.com/ngrx/platform/issues/4811) |
| 9 | +- **www:** add styles for video ([#4851](https://github.com/ngrx/platform/issues/4851)) ([85680a0](https://github.com/ngrx/platform/commit/85680a0)) |
| 10 | +- **www:** fix color-scheme and combine duplicate html declarations ([#4855](https://github.com/ngrx/platform/issues/4855)) ([f9b2565](https://github.com/ngrx/platform/commit/f9b2565)) |
| 11 | +- **www:** remove duplicate scrollbar ([#4829](https://github.com/ngrx/platform/issues/4829)) ([f0f1f2a](https://github.com/ngrx/platform/commit/f0f1f2a)), closes [#4828](https://github.com/ngrx/platform/issues/4828) |
| 12 | +- **www:** remove horizontal scrollbar ([#4808](https://github.com/ngrx/platform/issues/4808)) ([2639f67](https://github.com/ngrx/platform/commit/2639f67)) |
| 13 | + |
| 14 | +### build |
| 15 | + |
| 16 | +- update to Angular 20 ([#4778](https://github.com/ngrx/platform/issues/4778)) ([8a4ecd9](https://github.com/ngrx/platform/commit/8a4ecd9)) |
| 17 | + |
| 18 | +### Features |
| 19 | + |
| 20 | +- **effects:** remove act operator ([#4839](https://github.com/ngrx/platform/issues/4839)) ([9a83f1d](https://github.com/ngrx/platform/commit/9a83f1d)) |
| 21 | +- **entity:** strengthen typing of getInitialState ([#4819](https://github.com/ngrx/platform/issues/4819)) ([bfb21c2](https://github.com/ngrx/platform/commit/bfb21c2)), closes [#4422](https://github.com/ngrx/platform/issues/4422) |
| 22 | +- **eslint-plugin:** add new rule enforce type call ([#4809](https://github.com/ngrx/platform/issues/4809)) ([9b82e67](https://github.com/ngrx/platform/commit/9b82e67)), closes [#4797](https://github.com/ngrx/platform/issues/4797) |
| 23 | +- **operators:** deprecate `tapResponse` signature with a sequence of callbacks ([#4844](https://github.com/ngrx/platform/issues/4844)) ([9a16813](https://github.com/ngrx/platform/commit/9a16813)), closes [#4840](https://github.com/ngrx/platform/issues/4840) |
| 24 | +- **signals:** allow user-defined signals in `withState` and `signalState` by splitting `STATE_SOURCE` ([#4795](https://github.com/ngrx/platform/issues/4795)) ([521a2a6](https://github.com/ngrx/platform/commit/521a2a6)) |
| 25 | +- **signals:** enhance `withComputed` to accept computation functions ([#4822](https://github.com/ngrx/platform/issues/4822)) ([c8b15dd](https://github.com/ngrx/platform/commit/c8b15dd)), closes [#4782](https://github.com/ngrx/platform/issues/4782) |
| 26 | +- **www:** add sidebar for mobile view and make home page responsive ([#4813](https://github.com/ngrx/platform/issues/4813)) ([4397bfb](https://github.com/ngrx/platform/commit/4397bfb)), closes [#4807](https://github.com/ngrx/platform/issues/4807) |
| 27 | + |
| 28 | +### BREAKING CHANGES |
| 29 | + |
| 30 | +- **signals:** The internal `STATE_SOURCE` is no longer represented as a single `WritableSignal` holding the entire state object. Instead, each top-level state property becomes its own `WritableSignal` or remains as-is if a `WritableSignal` is provided as a state property. |
| 31 | + |
| 32 | +BEFORE: |
| 33 | + |
| 34 | +1. The initial state object reference is preserved: |
| 35 | + |
| 36 | +const initialState = { ngrx: 'rocks' }; |
| 37 | + |
| 38 | +// signalState: |
| 39 | +const state = signalState(initialState); |
| 40 | +state() === initialState; // true |
| 41 | + |
| 42 | +// withState: |
| 43 | +const Store = signalStore(withState(initialState)); |
| 44 | +const store = new Store(); |
| 45 | +getState(store) === initialState; // true |
| 46 | + |
| 47 | +2. Top-level `WritableSignal`s are wrapped with `Signal`s: |
| 48 | + |
| 49 | +// signalState: |
| 50 | +const state = signalState({ ngrx: signal('rocks') }); |
| 51 | +state.ngrx // type: Signal<WritableSignal<string>> |
| 52 | + |
| 53 | +// withState: |
| 54 | +const Store = signalStore(withState({ ngrx: signal('rocks') })); |
| 55 | +const store = new Store(); |
| 56 | +store.ngrx // type: Signal<WritableSignal<string>> |
| 57 | + |
| 58 | +3. Root state properties can be added dynamically: |
| 59 | + |
| 60 | +// signalState: |
| 61 | +const state = signalState<Record<string, string>>({}); |
| 62 | +console.log(state()); // {} |
| 63 | + |
| 64 | +patchState(state, { ngrx: 'rocks' }); |
| 65 | +console.log(state()); // { ngrx: 'rocks' } |
| 66 | + |
| 67 | +// withState: |
| 68 | +const Store = signalStore( |
| 69 | +{ protectedState: false }, |
| 70 | +withState<Record<string, string>>({}) |
| 71 | +); |
| 72 | +const store = new Store(); |
| 73 | +console.log(getState(store)); // {} |
| 74 | + |
| 75 | +patchState(store, { ngrx: 'rocks' }); |
| 76 | +console.log(getState(store)); // { ngrx: 'rocks' } |
| 77 | + |
| 78 | +AFTER: |
| 79 | + |
| 80 | +1. The initial state object reference is not preserved: |
| 81 | + |
| 82 | +const initialState = { ngrx: 'rocks' }; |
| 83 | + |
| 84 | +// signalState: |
| 85 | +const state = signalState(initialState); |
| 86 | +state() === initialState; // false |
| 87 | + |
| 88 | +// withState: |
| 89 | +const Store = signalStore(withState(initialState)); |
| 90 | +const store = new Store(); |
| 91 | +getState(store) === initialState; // false |
| 92 | + |
| 93 | +2. Top-level `WritableSignal`s are not wrapped with `Signal`s: |
| 94 | + |
| 95 | +// signalState: |
| 96 | +const state = signalState({ ngrx: signal('rocks') }); |
| 97 | +state.ngrx // type: Signal<string> |
| 98 | + |
| 99 | +// withState: |
| 100 | +const Store = signalStore(withState({ ngrx: signal('rocks') })); |
| 101 | +const store = new Store(); |
| 102 | +store.ngrx // type: Signal<string> |
| 103 | + |
| 104 | +3. Root state properties can not be added dynamically: |
| 105 | + |
| 106 | +// signalState: |
| 107 | +const state = signalState<Record<string, string>>({}); |
| 108 | +console.log(state()); // {} |
| 109 | + |
| 110 | +patchState(state, { ngrx: 'rocks' }); |
| 111 | +console.log(state()); // {} |
| 112 | + |
| 113 | +// withState: |
| 114 | +const Store = signalStore( |
| 115 | +{ protectedState: false }, |
| 116 | +withState<Record<string, string>>({}) |
| 117 | +); |
| 118 | +const store = new Store(); |
| 119 | +console.log(getState(store)); // {} |
| 120 | + |
| 121 | +patchState(store, { ngrx: 'rocks' }); |
| 122 | +console.log(getState(store)); // {} |
| 123 | + |
| 124 | +Co-authored-by: Tim Deschryver <[email protected]> |
| 125 | +Co-authored-by: michael-small <[email protected]> |
| 126 | +Co-authored-by: Marko Stanimirović <[email protected]> |
| 127 | + |
| 128 | +- The minimum required version of Angular has been updated. |
| 129 | + |
| 130 | +BEFORE: |
| 131 | + |
| 132 | +The minimum required version is Angular 19.x |
| 133 | + |
| 134 | +AFTER: |
| 135 | + |
| 136 | +The minimum required version is Angular 20.x |
| 137 | + |
| 138 | +<a name="20.0.0-beta.0"></a> |
| 139 | + |
3 | 140 | # [20.0.0-beta.0](https://github.com/ngrx/platform/compare/19.2.1...20.0.0-beta.0) (2025-06-10)
|
4 | 141 |
|
5 | 142 | ### Bug Fixes
|
|
0 commit comments