asab_webui_components 26.1.3 → 26.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -87,11 +87,9 @@ function AppStoreProvider(_ref) {
87
87
  children,
88
88
  app
89
89
  } = _ref;
90
- // Keep the initial state from the registry at mount
91
- var initialState = (0, _reducerRegistry.getInitialStates)();
92
90
  // Pulls the current reducer set on every action:
93
91
  var reducerFn = (0, _react.useCallback)((state, action) => combineReducers((0, _reducerRegistry.getReducers)())(state, action), []);
94
- var [state, dispatch] = (0, _react.useReducer)(reducerFn, initialState);
92
+ var [state, dispatch] = (0, _react.useReducer)(reducerFn, app.AppStore.state);
95
93
 
96
94
  // Wrapped dispatch to update both React state and global AppStore.state
97
95
  var wrappedDispatch = action => {
@@ -78,12 +78,10 @@ const AppStoreContext = createContext();
78
78
 
79
79
  // App store
80
80
  export function AppStoreProvider({ children, app }) {
81
- // Keep the initial state from the registry at mount
82
- const initialState = getInitialStates();
83
81
  // Pulls the current reducer set on every action:
84
82
  const reducerFn = useCallback((state, action) => combineReducers(getReducers())(state, action), []);
85
83
 
86
- const [state, dispatch] = useReducer(reducerFn, initialState);
84
+ const [state, dispatch] = useReducer(reducerFn, app.AppStore.state);
87
85
 
88
86
  // Wrapped dispatch to update both React state and global AppStore.state
89
87
  const wrappedDispatch = (action) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asab_webui_components",
3
- "version": "26.1.3",
3
+ "version": "26.1.4",
4
4
  "license": "BSD-3-Clause",
5
5
  "description": "TeskaLabs ASAB WebUI Components Library",
6
6
  "contributors": [