You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.
where as the implementation in generateStore.js https://github.com/trufflesuite/drizzle/blob/develop/packages/store/src/generateStore.js
uses for the same attribute the name appReducers.
Therefore, a user relying on the interface attribute name and using it for setting the reducer variable, will cause in the reducers being not applied to the store.
Also the attribute name in the documentation is wrong.
/**
* Generate the redux store by combining drizzleOptions, application reducers,
* middleware and initial app state.
*
* @param {object} config - The configuration object
* @param {object} config.drizzleOptions - drizzle configuration object
* @param {object} config.reducers={} - application level reducers to include in drizzle's redux store
* @param {object[]} config.appSagas=[] - application sagas to be managed by drizzle's saga middleware
* @param {object[]} config.appMiddlewares=[] - application middlewares to be managed by drizzle's saga middleware
* @param {boolean} config.disableReduxDevTools=false - disable redux devtools hook
* @returns {object} Redux store
*
*/
export function generateStore ({
drizzleOptions,
appReducers = {},
appSagas = [],
appMiddlewares = [],
disableReduxDevTools = false,
...options
}) {...}
Solution: Rename interface attribute to match implementation signature.
reducers -> appReducers
The text was updated successfully, but these errors were encountered:
guewin
added a commit
to guewin/drizzle
that referenced
this issue
Apr 2, 2022
Issue:
In
generateStore.d.ts
https://github.com/trufflesuite/drizzle/blob/develop/packages/store/types/generateStore.d.ts
the attribute for reducers has the name
reducers
where as the implementation in
generateStore.js
https://github.com/trufflesuite/drizzle/blob/develop/packages/store/src/generateStore.js
uses for the same attribute the name
appReducers
.Therefore, a user relying on the interface attribute name and using it for setting the reducer variable, will cause in the reducers being not applied to the store.
Also the attribute name in the documentation is wrong.
Solution: Rename interface attribute to match implementation signature.
reducers -> appReducers
The text was updated successfully, but these errors were encountered: